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

> At spring virtual f2f, we discussed that:
> 
> * There are many developers asking for this API for custom element constructors.
> * Nobody has raised concrete use cases for builtin elements.
> * Confirmed that Apple still doesn’t want builtin elements to be supported, and Google has historically opposed having this API without any builtin elements; @mfreed7 took an action item to follow up with @domenic about this objections.

Per my action item, I spoke to @domenic about this issue. He and I do agree that if we only support custom elements with this API, we're increasing the number of differences between custom elements and built-in elements. We have built-in elements, customized built-in elements, and autonomous custom elements. If I'm handed a constructor, it might or might not work with this new API, depending on what it is, and that feels pretty wrong. @rniwa - I'd be curious to hear whether you disagree with this. In the past, I've seen you arguing pretty strongly for platform consistency. But here you're arguing for **inconsistency** between custom elements and built-in elements. If the argument is just that the proposed API is on `CustomElementRegistry`, then perhaps we could move it somewhere more generic like `Document`?

Having said the above, I do see the obvious developer interest in this capability. We generally support this API, and want to move forward with an *interoperable* solution. So while we'd prefer to support all constructors, it seems that most/all use-cases center around custom element constructors, so we can go along with an API that only supports custom elements for now. Hopefully it would be defined in such a way that allows expansion later to support built-ins?

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

Received on Friday, 3 April 2020 01:50:36 UTC