W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2015

RE: Defining a constructor for Element and friends

From: Domenic Denicola <d@domenic.me>
Date: Tue, 13 Jan 2015 18:53:44 +0000
To: Ryosuke Niwa <rniwa@apple.com>
CC: Boris Zbarsky <bzbarsky@mit.edu>, Anne van Kesteren <annevk@annevk.nl>, WebApps WG <public-webapps@w3.org>, "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <CY1PR0501MB13695C5B88A72EAC4E5AC6DCDF400@CY1PR0501MB1369.namprd05.prod.outlook.com>
From: Ryosuke Niwa [mailto:rniwa@apple.com] 

> Or, we could always throw an exception in the constructor of HTMLUnknownElement so that nobody could do it.  It would mean that libraries and frameworks that do support custom elements without "-" would have to use document.createElement but that might be a good thing since they wouldn't be doing that in the first place.

That kind of breaks the design goal that we be able to explain how everything you see in the DOM was constructed. How did the parser (or document.createElement(NS)) create a HTMLUnknownElement, if the constructor for HTMLUnknownElement doesn't work?

Received on Tuesday, 13 January 2015 18:54:13 UTC

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