Cette traduction est incomplète. Aidez à traduire cet article depuis l'anglais.

This page is not complete.

The CustomElementRegistry interface provides methods for registering custom elements and querying registered elements. It can be accessed with window.customElements.

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.


Defines a new custom element.
Returns the constuctor for the named custom element, or undefined if the custom element is not defined.
Returns a promise that will be fulfilled when a custom element becomes defined with the given name. (If such a custom element is already defined, the returned promise is immediately fulfilled.)


// `window.customElements` is an instance of `CustomElementRegistry`
window.customElements instanceof CustomElementRegistry // true


Specification Status Comment
HTML Living Standard
The definition of 'CustomElementRegistry' in that specification.
Living Standard Initial definition.

Browser compatibility


FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support541 No2 Yes3 No41110.11
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic support561611 No2 ? No No10.11

1. Supports 'Autonomous custom elements' but not 'Customized built-in elements'

2. Under consideration

3. This feature is behind the dom.webcomponents.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.


Étiquettes et contributeurs liés au document

 Contributeurs à cette page : fscholz
 Dernière mise à jour par : fscholz,