Re: [DOM4]: Element.create

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 UTC