-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Boolean Attribute parsing #16021
Comments
Can you please clarify this part? I'm not sure this can be categorized as a bug, given |
Definitely. '
As I mentioned, I think the latter is probably a syntax error. I don't think I've seen any examples in the Ember docs of this, but I just wanted to clarify that this was the intended behavior. |
Did this behavior worked at some point in the past? |
I'm not sure, not to my knowledge |
@thec0keman I discussed this and I am sorry to tell you that we are closing this as not a bug. Changing this behaviour would affect other Ember users and cause strange behaviour in some scenarios ( Thank you and sorry for the inconveniences. |
@Serabe no worries. I think you answered my question sufficiently, and we came up with an alternative approach for emblem. Thanks! |
Recently we merged a PR in Emblem that restored automatic quoting of non-event HTML attributes:
(This functionality was for non-Ember apps using Emblem).
However, this breaks with Ember's coercion of boolean attributes:
The issue is that Ember (or Glimmer) will treat the string
"false"
as a truthy value. On the one hand this makes some sense, since Ember is already coercing variables to strings, and as far as it is concerned this syntax is saying 'no we really do want a string'. On the other, it is automatically detecting true / false / blank strings, and a case could be made that the string false should also be detected.Is this intended that the string 'false' will be treated as a truthy value?
Thanks!
The text was updated successfully, but these errors were encountered: