-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
only set attributes via properties when truly necessary #3013
Conversation
From #2935: There's more to do here. At least the |
I went through all the remaining attributes and double checked they were indeed boolean attributes and a quick perusal of the removed attributes. I apologize for not catching these the first time. We already know about That should be all of them. |
I'm looking at https://html.spec.whatwg.org/#attributes-3 right now, and it seems that there are a few others that ought to be boolean but are not currently in this list: |
I only checked the attributes on the original list but yeah, it looks like those should be on it as well. |
Okay almost there I think. I've just pushed another update - There are two supposedly boolean attributes (which I've marked with comments) where I could not find a corresponding property when I was inspecting the available properties in a browser. Do you know anything about either of these? |
There used to be an |
All right, I'm really hoping we're good now. I've set |
Hopefully fixes #1434 for real. Basically, this waaay cuts back on which attributes we set via properties. Thanks to @RedHatter for doing all of the hard work investigating this!
Since many more attributes now use the
attr
helper to set them, its logic for removing the attribute onnull
andundefined
can be used.