- From: Anne van Kesteren <notifications@github.com>
- Date: Tue, 10 Dec 2024 02:50:54 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 10 December 2024 10:50:58 UTC
``` const template = document.createElement('template'); registry.run(() => template.innerHTML = htmlString); return template.content.cloneNode(true); ``` I take this to mean that as the HTML parser runs, it would use _registry_ to lookup the element names it comes across? This seems similar to the idea in https://github.com/WICG/webcomponents/issues/1040#issuecomment-2498031090 of decoupling shadow trees and registries. I think a more principled approach for this would be for an element to be able to set the registry to use for its scope. Which can be distinct from the registry used to create the element. (This distinction is necessary primarily due to built-ins.) This would look like: ```js document.createElement("div", { inScopeRegistry: ... }); registry.createElement("foo-bar", { inScopeRegistry: someOtherRegistry }); ``` -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1043#issuecomment-2531214644 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1043/2531214644@github.com>
Received on Tuesday, 10 December 2024 10:50:58 UTC