W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Element.create(): a proposal for more convenient element creation

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 2 Aug 2011 02:53:19 +0000 (UTC)
To: Ryosuke Niwa <rniwa@webkit.org>
cc: Maciej Stachowiak <mjs@apple.com>, WebApps WG <public-webapps@w3.org>
Message-ID: <Pine.LNX.4.64.1108020252420.18680@ps20323.dreamhostps.com>
On Mon, 1 Aug 2011, Ryosuke Niwa wrote:
> On Mon, Aug 1, 2011 at 6:33 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> >
> > In an IRC discussion with Ian Hickson and Tab Atkins, we can up with 
> > the following idea for convenient element creation:
> >
> > Element.create(tagName, attributeMap, children…)
> 
> Can we alternatively extend document.createElement?  Or was this 
> intentionally avoided to associate new elements with documents?

We could, but I'd much rather have the shorter name, personally. Having 
the name be so long really makes that API unusable.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 2 August 2011 02:53:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:46 GMT