Re: [whatwg/dom] Scope non-scoped (global) registries to a single document (PR #1392)

@foolip approved this pull request.

Editorially this LGTM. For implementer support I defer to @mfreed7.

> @@ -7515,8 +7584,17 @@ are:
 <ol>
  <li><p>Let <var>registry</var> be <a>this</a>'s <a for=Element>custom element registry</a>.
 
- <li><p>If <var>init</var>["{{ShadowRootInit/customElementRegistry}}"] is non-null, then set
- <var>registry</var> to it.
+ <li>
+  <p>If <var>init</var>["{{ShadowRootInit/customElementRegistry}}"] is non-null:
+
+  <ol>
+   <li><p>Set <var>registry</var> to <var>init</var>["{{ShadowRootInit/customElementRegistry}}"].
+
+   <li><p>If <var>registry</var>'s <a for=CustomElementRegistry>is scoped</a> is false and

Am I reading this correct that the only thing you can do with `element.attachShadow({customElementRegistry: ...})` is to pass in the document's custom element registry, and anything else will throw an error? That makes it a boolean and practice, but I presume that this is a place where you're reserving some wiggle room for future changes?

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

Message ID: <whatwg/dom/pull/1392/review/3044533827@github.com>

Received on Tuesday, 22 July 2025 19:18:15 UTC