W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2013

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 02 Dec 2013 13:36:17 -0500
Message-ID: <529CD321.1080605@mit.edu>
To: www-dom@w3.org
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....

Received on Monday, 2 December 2013 18:36:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:21 UTC