English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
Browse thread
ANN: ocamljs 0.3
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jake Donham <jake@d...>
Subject: Re: [Caml-list] ANN: ocamljs 0.3
On Sun, Sep 5, 2010 at 6:05 AM, Christophe Papazian
<christophe.papazian@gmail.com> wrote:
> I was playing with ocamljs. It's very nice to use ocaml to
> produce javascript ! I have a question : in ocamljs, there is a support
> for style objects. However, I do not see how to use them usefully because
> there don't seem to have some set_style method anywhere (but I found the
> get_style).

Thanks for trying ocamljs. The Dom module just wraps (part of) the
browser DOM API, and in that API the style property is read-only (see
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-htmlelementcss).
You have to set properties on the style object for an element rather
than setting the style property of the element.

Jake