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

@justinfagnani 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.

Declarative shadow DOM has nothing to do with declarative custom elements. They are unrelated conceptually, as declarative custom elements would _not_ use declarative shadow DOM, and are at very, very different stages of proposal and implementation.

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

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

Received on Thursday, 11 August 2022 10:03:43 UTC