New issue
Advanced search Search tips

Issue 810289 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Element with a valid custom element name created by createElement(name, options) won't be upgraded

Project Member Reported by tkent@chromium.org, Feb 8 2018

Issue description

Chrome Version: 64 Stable, 66 Canary
OS: All but iOS

What steps will reproduce the problem?
(1) Load the following HTML:

<body>
<script>
class XFoo extends HTMLElement {}
let ce1 = document.createElement('x-foo');
let ce2 = document.createElement('x-foo', {});
customElements.define('x-foo', XFoo);
document.body.appendChild(ce1);
document.body.appendChild(ce2);
alert(ce1.constructor.name + ', ' + ce2.constructor.name);
</script>
</body>

What is the expected result?
An alert dialog with "XFoo, XFoo" is shown.

What happens instead?
An alert dialog with "XFoo, HTMLElement" is shown.

Please use labels and text to provide additional information.
Firefox and Safari work correctly.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/db2a27ac69114ede5b7afdf77174a4bf2be2adf1

commit db2a27ac69114ede5b7afdf77174a4bf2be2adf1
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Feb 09 04:09:34 2018

custom-elements: Element with a valid custom element name created by createElement(name, options) should be upgraded

createElement('my-foo', {}) was not upgraded even though
createElement('my-foo') is upgraded. Document::CreateElement() should
set "undefined" state even if the local name is valid for Custom Element
V0.

Bug:  810289 
Change-Id: If70c40d6de520fe79b73e7fb6b21d776e636fee9
Reviewed-on: https://chromium-review.googlesource.com/907912
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535627}
[modify] https://crrev.com/db2a27ac69114ede5b7afdf77174a4bf2be2adf1/third_party/WebKit/LayoutTests/external/wpt/custom-elements/Document-createElement.html
[modify] https://crrev.com/db2a27ac69114ede5b7afdf77174a4bf2be2adf1/third_party/WebKit/Source/core/dom/Document.cpp

Comment 2 by tkent@chromium.org, Feb 9 2018

Labels: M-66
Status: Fixed (was: Started)

Sign in to add a comment