-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Suggestion] Global state attribute #6953
Comments
Just fyi, in English we usually end our sentences with a period. Exclamation marks are used for exclamations, and when you use it all the time it sounds like you're shouting. |
How does this do that? "semantic aspect" is a pretty broad term, so could you be more specific?
CSS states are already pretty standardized I think, though if you know any outliers please let us know. I think HTML attributes are also mostly standardized, though a lot of them only share the same name; the attribute itself technically isn't the same. I think that could be solved by adding more interfaces though. For example:
This could be unified by having an
I think a new interface similar to MutationObserver could be used here instead of adding a new HTML attribute or event.
I don't see how this proposal solves either of those problems. Could you give some examples? |
I don't think this adds any concrete value, and instead just confuses the matter by adding two ways to do things. So, I'll close this. |
I suggest adding a new global
state
attribute to the HTMLElement interface! It can have one or more values at the same time! e.g.state="disabled,checked"
Goals
For example, we need an
open
boolean state attribute in<details>
also in<dialog>
and even non-standard tag like<popup>
(I don't think popup tag is good enough to be in the HTML standard!) and it can standard understate=""
attribute!onStateChange()
listener to check if any state changed to an element!state
attribute standard!Suggested state value
Below list just examples not include all states! Some state values may sound unnecessary but for example, they use in touch screens and are useful in many cases!
Considerations
The text was updated successfully, but these errors were encountered: