- From: Steve Orvell <notifications@github.com>
- Date: Thu, 21 Nov 2024 05:48:35 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 21 November 2024 13:48:39 UTC
@annevk > "I need to look at my parent for the registry" Noting that this is a change from the [proposal in the explainer](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md#finding-a-custom-element-definition) which says the registry is found by getting the context node's root (aka `getRootNode()`) What happens here? ```js const registry1 = new CustomElementRegistry(); registry1.define('x-foo', class XFooScoped extends HTMLElement {}); const shadowRoot1 = createConnectedShadowTree(registry1); const div = document.createElement('div'); shadowRoot1.append(div); div.innerHTML = `<x-foo></x-foo>`; xFoo = div.firstChild; xFoo instanceof XFooScoped // is this true? customElements.define('x-foo', class XFooGlobal extends HTMLElement {}); xFoo instanceof XFooGlobal // is this true? ``` -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1040#issuecomment-2491220701 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1040/2491220701@github.com>
Received on Thursday, 21 November 2024 13:48:39 UTC