-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
No attribute value rendered as "true" #1852
Labels
Comments
jvmccarthy
changed the title
Optional attribute value rendered as "true"
No attribute value rendered as "true"
Nov 16, 2018
IIRC that behaviour is valid for XHTML. Maybe Svelte is doing something here … |
Conduitry
added a commit
that referenced
this issue
Jan 5, 2019
- compile unknown bare attribute names to setting the attribute to "" - correctly stringify as bare attribute name in .innerHTML'd markup
Rich-Harris
added a commit
that referenced
this issue
Jan 13, 2019
Rich-Harris
added a commit
that referenced
this issue
Jan 13, 2019
better handling of bare attribute names in DOM mode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to render an element attribute with an optional value. For example,
However, svelte is rendering this with the value of "true",
If I add an empty string value, the rendering is as expected. This,
renders as,
I think the underlying call to
setAttribute()
should be a blank string if there is no value instead oftrue
.Svelte repl here. Inspecting the rendered output shows how without an attribute value, a value of "true" is rendered.
The text was updated successfully, but these errors were encountered: