Re: [w3c/webcomponents] Scoped Custom Element Registries (#716)

One thing that's unclear from https://github.com/justinfagnani/scoped-custom-elements is that in which tree(s) existing unknown custom elements are upgraded in `define` call.

There is another subtle but important aspect. When a shadow root is created without an explicit registry, it must use document's registry. But this is the owner document of the element, not of the global object to which the element's prototype comes from. This is an important point. Because it would mean that if you adopt a custom element C_1 from a document D_A (e.g. template document) to another document D_B, then any nested shadow roots S_N in that custom element C1's shadow roots S_1 would default to the other document D_B's registry, not the original document D_A's.

-- 
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/issues/716#issuecomment-677071243

Received on Thursday, 20 August 2020 04:56:48 UTC