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

>
> While `OtherElement` instances are never upgraded because all div's shadow roots are using scoped registries.

I don't think this is right. `this.attachShadow` in SomeElement didn't specify any registry so it should be using the global registry. 

If it automatically "inherited" parent shadow tree's registry, then this raises a new question. What happens when SomeElement is instantiated outside of a shadow tree then inserted into another shadow tree with a scoped registry. Note that this is precisely what happens in synchronous element construction case (e.g. by using `new`) so this behaving differently from the upgrade case is extremely confusing.

In other words, is the shadow tree's custom element registry determined at the time it's attached or is it dynamically determined by the tree structure. In order to have the semantics you described and not have an inconsistency between upgrade and synchronous construction case, we need to do the dynamic determination. But this poses yet another issue about temporarily detaching an element from a shadow tree so it's not great either.

All in all, there is a lot of open questions here.


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

Received on Wednesday, 26 August 2020 04:15:13 UTC