[Webkit-unassigned] [Bug 163147] New: importNode from template doesn't instantiate custom element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 7 15:10:27 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=163147
Bug ID: 163147
Summary: importNode from template doesn't instantiate custom
element
Classification: Unclassified
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jan at component.kitchen
CC: cdumez at apple.com
See http://jsbin.com/tukocup/1/edit?html,console.
class TestElement extends HTMLElement {}
customElements.define('test-element', TestElement);
let template = document.createElement('template');
template.innerHTML = `<test-element></test-element>`;
let clone = document.importNode(template.content, true);
let element = clone.querySelector('test-element');
console.log(element instanceof TestElement); // true in Chrome Canary, false in WebKit
This defines a custom element, then tries to use it in a template. Following the importNode call, the test-element node should be an instance of TestElement, but it's not. (It works as expected in Chrome Canary.)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161007/9e06a37b/attachment.html>
More information about the webkit-unassigned
mailing list