- From: Justin Fagnani <notifications@github.com>
- Date: Tue, 18 Mar 2025 15:36:48 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1341/review/2696465044@github.com>
@justinfagnani commented on this pull request. > @@ -6094,12 +6232,26 @@ It is initially set to false.</p> <p><a for=/>Shadow roots</a> have an associated <dfn for=ShadowRoot>serializable</dfn> (a boolean). It is initially set to false.</p> +<p><a for=/>Shadow roots</a> have an associated <dfn for=ShadowRoot>custom element registry</dfn> +(null or a {{CustomElementRegistry}} object).</p> + +<p><a for=/>Shadow roots</a> have an associated +<dfn for=ShadowRoot>keep custom element registry null</dfn> (a boolean). It is initially false. + +<p class=note>This can only ever be true in combination with declarative shadow roots. And it only Are there any cases where we want to be able to programmatically create shadow roots that emulate declarative shadow roots with a null registry? I think this might be the first instance where we can't imperatively make a shadow root that matches a declarative shadow root. That should be an issue for polyfilling (true polyfills after some browsers have shipped) things for DSD. For instance, to polyfill this feature, we would need to prevent declarative shadow roots from using the global registry. So we would have to emit on the server templates with an alternate `shadowrootmode` attribute, and imperatively instantiate the shadow roots, and record the fact that it had `shadowrootcustomelementregistry` attribute. If a future feature required a similar technique, then either we'd need to be able to set this option when creating the shadow root or be able to set a shadow root's registry to `null`. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1341#pullrequestreview-2696465044 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1341/review/2696465044@github.com>
Received on Tuesday, 18 March 2025 22:36:52 UTC