New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CustomStateSet for custom elements #688
Comments
Is the explainer out of date? the code sample there doesn't use the |
It very well could be. Chrome shipped this with feature requiring the double-dash prefix presumably to avoid collisions with future DOM state matches that might need to be built in. |
I can't comment on if Mozilla supports the proposal or not, but there is an intent to prototype (https://groups.google.com/u/1/a/mozilla.org/g/dev-platform/c/vDVxI6O3YqU) and there is an experimental implementation behind a flag in Nightly.
The explainer is up to date. The selector takes the shape of |
This looks sensible to me. Positive? |
Do we need a dashboard entry here? |
I could go either way. It's not a particularly big feature imo. |
Request for Mozilla Position on an Emerging Web Specification
Other information
This provides an API to allow custom element authors a way to expose internal state to the DOM for matching operations (including CSS and things like
document.querySelector
).This is done via the ElementInternals.prototype.states, which is a set of custom states. A naive example would be
This would mean that a newly-constructed instance of fancy-element would match against :--fancy.
The text was updated successfully, but these errors were encountered: