Re: Convenient way to create element and set its attributes at once

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]>
On 12/2/13 1:32 PM, Domenic Denicola wrote:
> I guess it would not be a constructor in that case though, i.e. you'd do `var myH1 = HTML.h1()` instead of `var myH1 = new HTML.h1()`, since otherwise you would break the `new X instanceof X` invariant.

This invariant is already broken when x is Image or Option or Audio, 
fwiw.  Or any other case that uses WebIDL's NamedConstructor....

-Boris
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.