- From: Steve Orvell <notifications@github.com>
- Date: Thu, 21 Nov 2024 05:26:37 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 21 November 2024 13:26:41 UTC
> @annevk and I discussed an alternative approach, which is to permanently associate each element with the registry from which it was created. What happens in this case and would this be a breaking change? ```js customElements.define('x-foo', class XFoo extends HTMLElement {}); customElements.define('x-bar', class XBar extends HTMLElement {}); const template = document.createElement('template'); template.innerHTML = `<x-foo></x-foo>`; const clone = template.content.cloneNode(true); // it has the registry from the template content's document which is empty? const xFoo = clone.firstChild; document.body.append(clone); xFoo instanceof XFoo // is this true? xFoo.innerHTML = `<x-bar></x-bar>`; xBar = xFoo.firstChild; xBar instanceof XBar // is this true? ``` -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1040#issuecomment-2491147500 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1040/2491147500@github.com>
Received on Thursday, 21 November 2024 13:26:41 UTC