-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix handling of boolean attributes #840
Conversation
Thanks @mrh0057! This has long been needed 👍 Could you please run |
#vtag.add_attribute("disabled", &"true"); | ||
} | ||
} | ||
}); | ||
let add_selected = selected.iter().map(|selected| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need special handling for selected
with your change. Can you please remove the special handling and ensure that selected
works properly as a boolean attribute?
@@ -24,6 +24,53 @@ pub enum ClassesForm { | |||
Single(Expr), | |||
} | |||
|
|||
lazy_static! { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a comment saying what the source of this list is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this list is not totally correct, see this comment: https://gist.github.com/ArjanSchouten/0b8574a6ad7f5065a5e7#gistcomment-2717606
@mrh0057 please add back |
The list you referenced is the one I used. I'm going through and manually checking on MDN each attribute in the list to see if it's a boolean attribute since the list is inaccurate. |
Removed deceprated attributes.
I went over this page: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes with all of the tags listed on the other github page. I also removed ones listed that only function if set using JavaScript. |
Great, thanks! Looks good, I'll merge once CI passes |
* Updated so boolean attributes are either there or not. Issue yewstack#394 * Ran cargo fmt. * Updated to remove checked and selected special handling. * Update the attribute list to match what mdn says. Removed deceprated attributes. * Added back the checked special handling.
Issue #394