- From: Pascal Schilp <notifications@github.com>
- Date: Mon, 01 Dec 2025 07:49:12 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/1029/3597306683@github.com>
thepassle left a comment (WICG/webcomponents#1029) > Attribute registries are scoped to element classes already. Is the use case having different attributes for the same element class if registered differently, in different registries? Is the use case adding an attribute to a built-in only when used within a WC's Shadow DOM, without affecting the built-in outside that? I'll start off by being real and saying; no, I did not read the entire thread, but still wanted to chime in on this in case nobody hadn't. If custom attributes were to become a thing, I see not being able to somehow scope being an issue (and also kind of the current proposal of tagging it onto HTMLInputElement for example) At my job we use custom elements extensively. We have a team that works on our design system, shipped as custom elements. Previously, those custom elements were registered globally via `customElements.define`. But now we use scoping via scoped registries. The usecase for that was; we have one app shell, where many feature teams' features come together. Feature-team-A may not be on the latest major version of the design system, so they might be using `ing-button@1.0.0`. But if feature-team-B uses `ing-button@2.0.0`, there's a problem. Scoped registries solved this for us, because now custom elements are scoped to the component where they're used. In a world where custom attributes exist, I'd see them falling under the responsibility of the design system team as well, and this becoming a similar problem for custom attributes. If Feature-team-A uses design-system@1.0.0, and feature-team-B uses design-system@2.0.0, where design-system is what tags custom attributes onto e.g. `HTMLInputElement`, there will be clashes. While I didn't read the entire thread, I did read the proposal, so it may be the case that this is something that was already discussed and potentially found a solution for, but still wanted to chime in just in case. Please feel free to disregard my comment if that was already the case. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1029#issuecomment-3597306683 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1029/3597306683@github.com>
Received on Monday, 1 December 2025 15:49:16 UTC