Re: [WICG/webcomponents] [Scoped registry] Clarify relationship with shadow roots (PR #965)

@nolanlawson commented on this pull request.



> +### Note on light DOM custom elements
+
+Custom elements that use light DOM (i.e. that don't call `this.attachShadow()`) may be scoped, but they must be scoped within a shadow root. For example:
+
+```html
+<body>
+  <shadow-element>
+    #shadow-root (registry=myCustomRegistry)
+      <light-element>
+        <div>Light DOM</div>
+      </light-element>
+  </shadow-element>
+</body>
+```
+
+In the above example, `<light-element>` is scoped within the shadow root of its containing `<shadow-element>`, whereas `<shadow-element>` is defined at the global document level.

I was under the impression that Declarative Shadow DOM was out-of-scope for this proposal... Although there is some reference to it [here](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md#intersection-with-declarative-shadow-root).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/pull/965#discussion_r942939465
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/pull/965/review/1068978638@github.com>

Received on Wednesday, 10 August 2022 21:57:52 UTC