Re: [w3c/webcomponents] Is there a way to retrieve the localName from a custom element constructor? (#566)

>> CustomElementRegistry and window.customElements should be about custom elements, not builtin elements. None of existing methods do anything with builtin elements.
>
>So a solution like the one I proposed above — representing built-ins in a registry that was separate from `customElements` — would at least meet this particular requirement, correct? That’s not to say that you'd accept that particular solution; I'm just trying to confirm my understanding of your requirement.

Not if `customElements` inherits from `rootRegistry` as you proposed. If it's a completely orthogonal feature, then that might work although I'd object that to such an orthogonal feature for the same reason I stated.

I really don't understand why there is suddenly a need for `CustomElementRegistry` to suddenly care about builtin elements. Literally every other method in `CustomElementRegistry` doesn't do anything with builtin elements. Why is this feature so different?  e.g. exiting get method doesn't return constructors of builtin elements. Why is it different for getting local names out of constructors?

> The only compromise I could envision would be if Apple and Google could agree in principle to spreading out this work over time. E.g., to use my `rootRegistry` strawman above just as an example, let's imagine that everyone thought that was a reasonable solution

Since we don't want to introduce such a mapping in the first place, I don't see why we'd agree to a solution which involves adding the very thing we don't want eventually.

-- 
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/566#issuecomment-546075937

Received on Thursday, 24 October 2019 19:52:13 UTC