Re: Defining a constructor for Element and friends
Ryosuke Niwa <[email protected]>
| Newsgroups | gmane.comp.web.dom.general,gmane.org.w3c.webapps |
|---|---|
| Message-ID | <[email protected]> |
On Jan 13, 2015, at 10:53 AM, Domenic Denicola <[email protected]> wrote: > From: Ryosuke Niwa [mailto:[email protected]] > >> 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? I didn't know that we had such a design goal. In general, backwards and forwards compatibilities are much more important than design purity. - R. Niwa