Skip to content

Missing scoped custom element registries docs #43237

@captainbrosset

Description

@captainbrosset

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/CustomElementRegistry

What specific section or headline is this issue about?

Multiple

What information was incorrect, unhelpful, or incomplete?

Scoped custom element registries are very useful for consumers of web components, especially for those who use their own component libraries, or that import 3rd-party libraries.

Today, all components are registered into a single, global registry, which means that two different components can't use the same tagname (like <fancy-button>) without the page breaking.

Scoped custom element registries allow consumers to scope different custom elements to different documents, elements, or shadow roots.

This is useful, for example, when importing a 3rd-party component library, or when testing multiple versions of the same library side by side.

The scoped custom element registry feature is documented partially on MDN:

The following docs (at least) seem to be missing:

What did you expect to see?

Adequate docs for the missing pieces listed above.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

I think scoped custom element registries are already supported in Safari, and coming to Edge and Chrome 146. Not sure when individual pieces of the API shipped.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions