Re: [WICG/webcomponents] Proposal: Custom attributes for all elements, enhancements for more complex use cases (Issue #1029)

sorvell left a comment (WICG/webcomponents#1029)

### Scopes

@keithamus 

> Additionally Custom Attributes would be scopable to ShadowDOM just like Custom Elements are

As @annevk also noted, custom element scopes are tied to Element|Document|ShadowRoot, but let me isolate the key concern:

If some other code has registered an `x-foo` attribute on `Input` and I use an `x-foo` attribute on an `<input>` I create, I should be able to control if that attribute customizes or not (let's not get stuck on the default behavior, just the capability).

### Element integration

@LeaVerou 

> Also, depending on how far we want to take the Attr thing, one could conceivably also hang methods on that.

To me, this is a core part of the feature since it's a (custom) attribute. If it behaves some other way, I'd suggest we should call it something else. Elements have attributes and they are accessible via the `.attribute` property. IMO, it would just feel very surprising if this proposal didn't adhere to and leverage that fact.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1029#issuecomment-3598666764
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1029/3598666764@github.com>

Received on Monday, 1 December 2025 20:19:08 UTC