W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2011

Re: [DOM4]: Element.create

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 16 Sep 2011 22:01:42 +0000 (UTC)
To: Anne van Kesteren <annevk@opera.com>
cc: www-dom@w3.org
Message-ID: <Pine.LNX.4.64.1109162157160.26180@ps20323.dreamhostps.com>
On Thu, 15 Sep 2011, Anne van Kesteren wrote:
> On Thu, 15 Sep 2011 20:07:51 +0200, Charles Pritchard <chuck@jumis.com> wrote:
> > On webapps, we discussed a helper method, "create", which might fit well in
> > DOM4.
> > http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/0707.html
> > 
> > Element.create('img', {src: '...'}),
> 
> I'm not sure what the second argument should be in terms of Web IDL. It's
> basically an unconstrained dictionary, but we do not have that at the moment.

"object", and define how to process it in prose.


> It's also unclear to me whether the second argument should set 
> properties or attributes.

IMHO definitely content attributes. Setting properties seem like it would 
involve all kinds of complicated subtlties like setting order, how to 
handle properties like .innerHTML, etc.

Are there good use cases for setting properties?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 16 September 2011 22:04:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:08 GMT