bodil / typed-html

Type checked JSX for Rust
Mozilla Public License 2.0
1.86k stars 62 forks source link

Differentiate between boolean attribute and enumerated "bool" attribute #124

Open wwylele opened 2 years ago

wwylele commented 2 years ago

Both draggable and contenteditable attributes have meaningful "false" value, which is different from missing the attribute. The HTML spec says these attributes are enumerated, not boolean. We should provide a way for user to explicitly set the attribute as false.

Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable