createElement() with Invalid combination of local-name and 'is' value should not throw |
|||
Issue description
Chrome Version: ToT
OS: All but iOS
What steps will reproduce the problem?
(1) Open the following URL:
data:text/html;charset=utf-8,<body><script> class PlasticDiv extends HTMLDivElement {} customElements.define('plastic-div', PlasticDiv, { extends: 'div' }); var pdiv = document.createElement('div', {is:'iron-div'}); alert(pdiv instanceof PlasticDiv);</script>
What is the expected result?
An alert dialog with "false" is opened.
What happens instead?
No alert dialog.
DevTools console has:
Uncaught DOMException: Failed to execute 'createElement' on 'Document': Custom element definition not found.
Please use labels and text to provide additional information.
This exception was removed from the specification.
See https://github.com/w3c/webcomponents/issues/608
,
Feb 1 2018
,
Feb 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ae25beae260de5f2560003a65c46710eb296570f commit ae25beae260de5f2560003a65c46710eb296570f Author: Kent Tamura <tkent@chromium.org> Date: Thu Feb 01 15:04:43 2018 custom-elements: createElement() should not throw for unknown "is" value. Reference: https://github.com/w3c/webcomponents/issues/608 Bug: 807205 Change-Id: I3edeb9c9c7aa673ff3d9130c87d275c39ea9081e Reviewed-on: https://chromium-review.googlesource.com/897313 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#533660} [modify] https://crrev.com/ae25beae260de5f2560003a65c46710eb296570f/third_party/WebKit/LayoutTests/custom-elements/spec/create-element.html [modify] https://crrev.com/ae25beae260de5f2560003a65c46710eb296570f/third_party/WebKit/LayoutTests/custom-elements/v0-v1-interop.html [modify] https://crrev.com/ae25beae260de5f2560003a65c46710eb296570f/third_party/WebKit/LayoutTests/external/wpt/custom-elements/Document-createElement.html [modify] https://crrev.com/ae25beae260de5f2560003a65c46710eb296570f/third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html [modify] https://crrev.com/ae25beae260de5f2560003a65c46710eb296570f/third_party/WebKit/Source/core/dom/Document.cpp [modify] https://crrev.com/ae25beae260de5f2560003a65c46710eb296570f/third_party/WebKit/Source/core/dom/Document.h
,
Feb 1 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by tkent@chromium.org
, Jan 30 2018