- From: Steve Orvell <notifications@github.com>
- Date: Fri, 08 Dec 2023 07:16:08 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 8 December 2023 15:16:14 UTC
Assuming the behavior described in the explainer's [Finding a custom element definition](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md#note-on-looking-up-registries) section, consider the following. 1. Define `x-foo` in the global **_and_** a scoped registry. 2. In a shadowRoot using that registry, create an element:`el = shadowRoot.createElement('div')`. 3. Now create and `x-foo` via `innerHTML`: `el.innerHTML = '<x-foo></x-foo>'`. I believe this results in an `x-foo` element upgraded via the global registry, and that behavior seems surprising and unexpected. I would expect in that case the `x-foo` element would use the scoped registry definition. Perhaps this could be addressed if elements had an `ownerRegistry` setting (similar to `ownerDocument`) that could be used to lookup the correct definition. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1040 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1040@github.com>
Received on Friday, 8 December 2023 15:16:14 UTC