Re: [w3ctag/design-reviews] Scoped Custom Element Registries (Issue #1070)

jyasskin left a comment (w3ctag/design-reviews#1070)

Thanks for sending this to us. The TAG discussed it and agreed on the following feedback, with lots of credit to @christianliebel and @dandclark.

This feature was somewhat hard to review because the changes in https://github.com/whatwg/html/issues/10854 build on top of the older explainer  https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md, so it's not always clear which parts of the old explainer still apply; the spec PRs are the only real source of truth. As a convenience to others who will want to reference it in the future, we think it would be worthwhile if the folks working on this could coalesce the current state of things into a more up-to-date explainer doc, including a security and privacy review which is currently missing. We also encourage taking the time to ensure that other developer-facing materials like MDN docs and the polyfill https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry are updated.

That said, we are happy with the direction of the design. Supporting usage independent of shadow DOM will allow for more flexibility in how libraries will use scoped custom element registries to build components. The interesting cases about moving elements between shadows and between documents seem to have been well-considered. Making a given element's custom element registry unchangeable once it's been set makes things easier to reason about compared to alternative designs that would allow elements and shadow trees to swap registries more freely.

We note that hierarchical registries/inheritance are not supported in this proposal. We think it's important that the proposal allow this to be added in the future, as developers will likely find that inheritance is the next thing they need in this space once the issue of collisions is solved.

Thanks to everyone involved for all the work that has gone into this! The TAG is aware that there's been a lot of developer interest and positive feedback for the feature, which is encouraging.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1070#issuecomment-2855297722
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1070/2855297722@github.com>

Received on Tuesday, 6 May 2025 16:58:40 UTC