Scoped custom element registries are now available by default in Chrome 146 and Edge, solving the long-standing problem of name collisions in the global `window.customElements` registry. Developers can now create independent registries and scope them to a shadow root, a disconnected document, or an individual element. This enables multiple teams or libraries to define custom elements with the same tag name without conflicts, making micro-frontend and component library composition much more manageable. The feature requires no flags or origin trial opt-in in Chromium-based browsers.

5m read timeFrom developer.chrome.com
Post cover image
Table of contents
What's a scoped custom element registry?Create a new registryScope your registryLearn more
1 Comment

Sort: