attachShadow is undefined in custom element constructor. |
|||||
Issue description
Version: 53.0.2775.0 (64-bit)
`this.attachShadow` is undefined in custom element constructor. I believe this code should work:
customElements.define('x-foo', class extends HTMLElement {
constructor() {
super();
let shadowRoot = this.attachShadow({mode: 'open'});
shadowRoot.innerHTML = `
<b>I'm in shadow dom!</b>
<slot></slot>
`;
}
});
Chromium is complaining it's undefined.
,
Jun 23 2016
,
Jun 23 2016
,
Jun 23 2016
,
Jun 24 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fa38a0afc1d55a8a625b87514d4799877c2d2ef7 commit fa38a0afc1d55a8a625b87514d4799877c2d2ef7 Author: hayato <hayato@chromium.org> Date: Fri Jun 24 01:51:04 2016 Support Custom Elements v1 in attachShadow After renaming CustomElement to CustomElementV0, it looks the support of Custom Elements v1 in attachShadow has been forgotten. Fix it. BUG= 531990 , 621942 Review-Url: https://codereview.chromium.org/2092703002 Cr-Commit-Position: refs/heads/master@{#401779} [modify] https://crrev.com/fa38a0afc1d55a8a625b87514d4799877c2d2ef7/third_party/WebKit/LayoutTests/shadow-dom/attach-shadow-safelist.html [modify] https://crrev.com/fa38a0afc1d55a8a625b87514d4799877c2d2ef7/third_party/WebKit/Source/core/dom/Element.cpp
,
Jun 24 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by hayato@chromium.org
, Jun 22 2016Owner: hayato@chromium.org
Status: Assigned (was: Untriaged)