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

Thanks @justinfagnani yes, I think I get that subtlety now. My confusion stems from the fact that in this case:

```js
const registry = new CustomElementRegistry()
customElements.define('my-element', class extends HTMLElement {
  constructor() {
    super()
    this.attachShadow({ mode: 'open', registry })
  }
})
```

... `<my-element>` is actually _not_ the scoped definition. Instead, it's any other custom elements that are defined _inside_ of `<my-element>`'s shadow root.

I could be wrong, but it seems to me that this could be a common confusion, because of the proximity of `my-element` to the `registry`.

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

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

Received on Wednesday, 10 August 2022 22:10:34 UTC