Skip to content

Scoped custom element registries #1027

Closed

Description

@thepassle

Description

Original proposal:
https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md

More up to date:
whatwg/html#10854

This proposal allows for multiple custom element definitions for a single tag name to exist within a page.

This is accomplished by allowing user code to create multiple custom element registries and associate them with shadow roots that function as scopes for element creation and custom element definitions. Potentially custom elements created within a scope use the registry for that scope to perform upgrades. New element construction APIs are added to ShadowRoot to allow element creation to be associated with a scope.

Specification

https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-api https://dom.spec.whatwg.org/#element-custom-element-registry

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/scoped-custom-element-registries/

Test Links

https://github.com/web-platform-tests/wpt/tree/master/custom-elements/registries

Additional Signals

whatwg/html#10869
https://webkit.org/standards-positions/#:~:text=Scoped%20Custom%20Element%20Registries
mozilla/standards-positions#424

Activity

  1. github-actions commented on Sep 5, 2025

    @github-actions

    This comment was automatically generated based on the information you provided. Please don't edit it.

    Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
    If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
    To find feature IDs, use the web-features explorer.

    Feature Scoped custom element registries

    • ID: scoped-custom-element-registries
    • Name: Scoped custom element registries
    • Description: 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.
    • Baseline status: Limited Availability
    • More information: See the web-features explorer
  2. dandclark commented on Jan 28, 2026

    @dandclark
    Contributor

    Looking at the tests under https://wpt.fyi/results/custom-elements/registries, all are related to scoped custom elements registry except for these, which only deal with the global registry:

    • define-customized-builtins.html
    • define.html
    • initial-about-blank.window.html
    • per-document.html
    • upgrade.html
    • valid-custom-element-names.html

    So a good test list would be https://wpt.fyi/results/custom-elements/registries excluding those 6 tests.

  3. wpt-interop commented on Feb 12, 2026

    @wpt-interop
    Collaborator

    Thank you for proposing Scoped custom element registries for Interop 2026.

    We are pleased to let you know that it has been accepted as part of the Scoped custom element registries focus area.

    You’ll be able to track progress on this topic throughout the year via the Interop 2026 dashboard.

    Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions