Re: [whatwg/dom] Set registry on null registry element on adopt instead of on insert (PR #1423)

@annevk commented on this pull request.



> +     <li>
+      <p>If <var>inclusiveDescendant</var> is a <a for=/>shadow root</a>:
+
+      <ol>
+       <li><p>if <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a>
+       is null or <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a>'s
+       <a for=CustomElementRegistry>is scoped</a> is false, then set
+       <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a> to
+       <var>document</var>'s <a>effective global custom element registry</a>.

```suggestion
     <li><p>If <var>inclusiveDescendant</var> is a <a for=/>shadow root</a> and either
     <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a> is null or
     <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a>'s
     <a for=CustomElementRegistry>is scoped</a> is false, then set <var>inclusiveDescendant</var>'s
     <a for=ShadowRoot>custom element registry</a> to <var>document</var>'s
     <a>effective global custom element registry</a>.
```

> +     <li>
+      <p>If <var>inclusiveDescendant</var> is a <a for=/>shadow root</a>:
+
+      <ol>
+       <li><p>if <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a>
+       is null or <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a>'s
+       <a for=CustomElementRegistry>is scoped</a> is false, then set
+       <var>inclusiveDescendant</var>'s <a for=ShadowRoot>custom element registry</a> to
+       <var>document</var>'s <a>effective global custom element registry</a>.

But I think this is incorrect and we still need "keep custom element registry null" here. Have you looked at how the HTML Standard sets "keep custom element registry null"? How is the `shadowrootcustomelementregistry` content attribute supported in this new world?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1423#pullrequestreview-3486067232
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1423/review/3486067232@github.com>

Received on Thursday, 20 November 2025 07:21:04 UTC