Intent to Prototype: Scoped Custom Element Registry

388 views
Skip to first unread message

Xiaocheng Hu

unread,
Aug 24, 2022, 6:06:33 PM8/24/22
to blink-dev

Contact emails

xiaoc...@chromium.org

Explainer

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

Specification

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

Summary

This feature allows for multiple custom element definitions for a single tag name to exist within a page to prevent custom element name conflicts when a web app uses libraries from multiple sources. This is achieved 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.



Blink component

Blink>HTML>CustomElements

Motivation

It's quite common for web applications to contain libraries from multiple sources, whether from different teams, vendors, package managers, etc. These libraries must currently contend for the global shared resource that is the CustomElementRegistry. If more than one library (or more than one instance of a library) tries to define the same tag name, the application will fail. This feature solves the problem by using ShadowRoots, which already function as encapsulation boundaries, to also function as scopes for custom element definitions.



Initial public proposal

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

TAG review



TAG review status

Pending

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability



Is this feature fully tested by web-platform-tests?

No

Flag name



Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1304439

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5090435261792256

This intent message was generated by Chrome Platform Status.

Lea Verou

unread,
Aug 26, 2022, 6:19:13 AM8/26/22
to blink-dev, xiaoc...@chromium.org
Hi there,
I see it says "Pending" for the TAG review, but I cannot find any TAG review request in https://github.com/w3ctag/design-reviews/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
Could you please point me to it? 
Thanks!

Xiaocheng Hu

unread,
Aug 26, 2022, 3:06:00 PM8/26/22
to Lea Verou, blink-dev, xiaoc...@chromium.org
Hi Lea,

No TAG review has been requested yet. "Pending" is just the default value (which might also be confusing though...)
Reply all
Reply to author
Forward
0 new messages