Re: [DOM4]: Element.create

On Thu, 15 Sep 2011 20:07:51 +0200, Charles Pritchard <>  
> On webapps, we discussed a helper method, "create", which might fit well  
> in DOM4.
> 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  

It's also unclear to me whether the second argument should set properties  
or attributes. Setting attributes would be consistent with the DOM model.  
Setting properties might be more convenient, but e.g. setting innerHTML  
complicates matters as there is also a third argument to Element.create to  
conveniently set children.

Anne van Kesteren

Received on Thursday, 15 September 2011 18:17:59 UTC