Re: [WICG/webcomponents] Why can't the registry enumerate the custom elements? (#775)

sconosciute left a comment (WICG/webcomponents#775)

I'm working my way through my first app using web components and today was hoping to enumerate the list of custom elements defined in the registry to troubleshoot when/where they are defined. Now if I want to do that I have to make a list of all my custom component names and iterate over that list, calling the customElements.get() function on each name to see if it exists.

It seems silly to me that we're looking for a reason to include this API. The registry acts as a map. Maps generally have functionality for enumerating their contents for various reasons, including troubleshooting. It's a glaring hole in the API surface of the custom element registry.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/775#issuecomment-4640409361
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/775/4640409361@github.com>

Received on Saturday, 6 June 2026 21:29:46 UTC