Issue metadata
Sign in to add a comment
|
document.createElement() with undefined autonomous custom element name sometimes creates HTMLUnknownElement |
||||||||||||||||||||||
Issue description
Chrome Version: 66 canary
OS: All but iOS
What steps will reproduce the problem?
(1) Open DevTools console, and type the following:
(new Document()).createElementNS("http://www.w3.org/1999/xhtml", "x-foo",
{}).constructor.name
What is the expected result?
Show "HTMLElement"
What happens instead?
Show "HTMLUnknownElement"
Please use labels and text to provide additional information.
Google Chrome 64 works correctly. This is a recent regression, probably made by me!
https://html.spec.whatwg.org/multipage/dom.html#elements-in-the-dom:element-interface
,
Feb 8 2018
,
Feb 8 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/021c2a9786554cc2c7f8bbcaa7cbe52e995e462f commit 021c2a9786554cc2c7f8bbcaa7cbe52e995e462f Author: Kent Tamura <tkent@chromium.org> Date: Thu Feb 08 04:32:51 2018 custom-elements: document.createElementNS should not create HTMLUnknownElement for a valid custom element name Document::CreatRawElement() should check CustomElement::IsValidName(). It failed only if the Document didn't have V0 RegistrationContext. Bug: 809887 Change-Id: I4e5d283658673db3e1db15b136ca5729d29e2442 Reviewed-on: https://chromium-review.googlesource.com/908128 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#535299} [modify] https://crrev.com/021c2a9786554cc2c7f8bbcaa7cbe52e995e462f/third_party/WebKit/LayoutTests/external/wpt/custom-elements/Document-createElementNS.html [modify] https://crrev.com/021c2a9786554cc2c7f8bbcaa7cbe52e995e462f/third_party/WebKit/Source/core/dom/Document.cpp
,
Feb 8 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by tkent@chromium.org
, Feb 7 2018- This doesn't happen if we use window.document instead of (new Document()) - This doesn't happen if we remove the third argument {}