Re: [w3c/webcomponents] Add Scoped CustomElementRegsitry explainer (#865)

@LarsDenBakker 

> In previous drafts registries were inherited through the DOM hierarchy. Is this intentionally out of the current proposal? I think it's a good thing, but just making sure.

It's very much intentional and based on discussion and feedback. The goal is to allow a component to safely operate without interference from other scopes. If a component uses a scoped registry, we presume it doesn't want interference from outer scopes. If it does, then it has to opt into inheritance.

> If an element is in one shadow root and moves to another shadow root, it's element definition is still the one it received from the initial shadow root, correct? That wasn't fully clear to me from the wording.

No, it will use the registry from the shadow root it's _currently_ in. Moving elements between scopes is very, very rare.

> For the list in Why do developers need scoped custom element registries? I think there are two more benefits:

Thanks for those! I'll add them.

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

Received on Friday, 21 February 2020 20:07:46 UTC