coderef

Scoped custom element registriesLimited availability

The CustomElementRegistry() constructor creates a new custom element registry that's separate from the global window.customElements registry. Creating more than one registry is useful for multiple custom elements that have the same tag name to coexist.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–145Not supported
146+Supportedsince Mar 10, 2026
Current: 155
Edge
12–145Not supported
146+Supportedsince Mar 13, 2026
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
1–18.6Not supported
26+Supportedsince Sep 15, 2025
Current: 27
MobileChrome Android
18–145Not supported
146+Supportedsince Mar 10, 2026
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–18.6Not supported
26+Supportedsince Sep 15, 2025
Current: 27

How to use

Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: CustomElementRegistry.

Feature detection

JS · check before using
if ("CustomElementRegistry" in globalThis && "CustomElementRegistry" in CustomElementRegistry.prototype) {
  // CustomElementRegistry.CustomElementRegistry is available
}

Sub-features

Support for each part of the feature (6). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
CustomElementRegistry.CustomElementRegistry146146✕26146✕26
CustomElementRegistry.initialize146146✕26146✕26
Document.customElementRegistry146146✕26146✕26
Element.customElementRegistry146146✕26146✕26
HTMLTemplateElement.shadowRootCustomElementRegistry146146✕26146✕26
ShadowRoot.customElementRegistry146146✕26146✕26