- From: Domenic Denicola <notifications@github.com>
- Date: Sun, 29 Apr 2018 16:46:40 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 29 April 2018 23:47:05 UTC
https://dom.spec.whatwg.org/commit-snapshots/4b2633f0b79aa4b49245e6a5022baf6a2b5dffe6/#example-5ffcda00 > Let namespace be the HTML namespace, if the context object is an HTML document or context object’s content type is "application/xhtml\+xml", and null otherwise\. Consider the following code: ```js const doc = new Document(); const a = document.createElement("a"); console.log(a.constructor.name); ``` This logs `HTMLAnchorElement` in all browsers. However, per spec this should log `Element`. `new Document()` creates a new XML document, with content-type application/xml. So createElement() should use the null namespace. So when you go to look up the element interface to use, you just get the default, Element. This seems to have been changed previously: - https://github.com/whatwg/dom/issues/264 - https://github.com/whatwg/dom/pull/213 - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19431 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/643
Received on Sunday, 29 April 2018 23:47:05 UTC