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

@rniwa I thought we agreed in the last virtual f2f that shadow roots with scoped registries should not inherit from the main registry - once you add a scoped registry you need to add definitions for all elements you use.

So the explainer has this line in the Overview

> Definitions in this registry do not apply to the main document, and vice-versa. The registry must contain definitions for all elements used.

and is also implied in the * Finding a custom element definition* section:

> That process needs to take a context node that is used to look up the definition. The registry is found by getting the context node's root. If the root has a CustomElementRegistry, use that registry to look up the definition, otherwise use the global objects CustomElementRegistry object.

That might not standout enough though, so you have a suggestion for how to make that more clear. I don't have a section on upgrades because it seems like upgrading is untouched by this change, only the "find a registry" steps are and everything past that is the same.

Maybe that's not quite right though and for upgrades the tree walk to find elements to upgrade needs to be modified too?

-- 
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-699034265

Received on Friday, 25 September 2020 16:45:35 UTC