- From: Ryosuke Niwa <notifications@github.com>
- Date: Tue, 21 Dec 2021 22:32:23 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 22 December 2021 06:32:35 UTC
> `customElements.upgrade` does not seem to upgrade node subtrees cloned from a `template` element via `cloneNode` in Firefox 95 and Chrome 96. I haven't tested other browsers. > > Is this expected behavior? Yes, this is expected because `el2`'s document is [**appropriate template contents owner document**](https://html.spec.whatwg.org/multipage/scripting.html#appropriate-template-contents-owner-document) of the document (which is `el1`'s document and where the custom element is defined). In order for upgrade to work, you must call `document.adoptNode` first. Alternatively, you can use `importNode` instead of `cloneNode` and clone the template contents using the correct document. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/946#issuecomment-999322180 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/946/999322180@github.com>
Received on Wednesday, 22 December 2021 06:32:35 UTC