Re: Element.createElement proposal

Ted Mielczarek <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On Tue, Oct 27, 2009 at 6:44 PM, Robert O'Callahan <[email protected]>wrote:

> Instead of using a JS object, it's probably more performant, and I think
> slightly more convenient, to just specify extra arguments:
>  e.addChild("span", "class", "hello", "style", "width:100px");
> You can write it as
>  e.addChild("span",
>             "class", "hello",
>              "style", "width:100px");
> if you like.
>

That strikes me as less intuitive, and it also doesn't match what existing
JS libraries like jQuery provide:
http://docs.jquery.com/Attributes/attr#properties
http://docs.jquery.com/CSS/css#properties

-Ted
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.