Chrome Version: ToT
OS: All but iOS
What steps will reproduce the problem?
(1) In <script> in an SVG document, run the following code:
class MyElement1 extends HTMLElement {}
customElements.define('my-element', MyElement1);
let element = document.createElement('my-element', {});
alert(element instanceof MyElement1);
class MyElement2 extends HTMLDivElement {}
customElements.define('my-div', MyElement2, { extends: 'div' });
element = document.createElement('div', { is: 'my-div' });
alert(element instanceof MyElement2);
What is the expected result?
Two alert dialogs with "false"
What happens instead?
Two alert dialogs with "true"
Please use labels and text to provide additional information.
Our Document::creteElement(local_name, string_or_options, exception_state) doesn't have a check for HTML-lie document. i.e. "IsXHTMLDocument() || IsHTMLDocument()"
Firefox works correctly.
Comment 1 by bugdroid1@chromium.org
, Jan 31 2018