← Back to release summary

CustomElementsGetName

Category
Web Components
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
Start prototyping

Summary

customElements.getName() returns the tag name of the given custom element definition.

Motivation

Currently there is no way to get the local name of a custom element without instantiating the instance and checking the localName property. This new method allows querying the customElementRegistry to discover the localName of a definition without creating an instance.

Standards & signals

Explainers: https://github.com/WICG/webcomponents/issues/566#issuecomment-882359087

View on chromestatus.com