Re: [w3ctag/design-reviews] [WebComponents] Custom state pseudo class (#428)

@WebReflection Thank you for the feedback.

> The meaning of a state

The purpose of the proposal is not to help implementation of general states of custom elements.  It's to provide a way to expose read-only states which can't be represented by HTML attributes.  If a state of a custom element is already exposed as an HTML attribute, we don't need to apply the proposal to the state because we already have attribute selectors.
`_internals.states` is an interface with which custom element implementations tell their states to browsers.  Using it as a primary storage of states is not a goal of the proposal though such usage is possible.

`ElementInternals` and `attachInternals()` are not a part of the proposal. The proposal just depends on them.  `ElementInternals` is the place to provides APIs which only custom element implementations can call.

> About ditching built-ins Elements

At this moment the proposal doesn't support customized built-in elements, but enabling the feature for customized builtin-elements is not difficult.  We'd like to start with the smallest feature, and enabling it needs to change the behavior of existing APIs.  So we'd like to defer it.

> About using classes and the "collision" argument

`_internals` is not  `states`.  You seems to misread the proposal.


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

Received on Monday, 16 December 2019 15:15:04 UTC