You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have trouble here with the nature of attributes as defined by HTML/DOM.
TL;DR:
Currently we follow DOM standards, which means you can do foo=" " (single space) to make foo a string, but if you set foo="" (empty string) it will be true.
The NaN thing is weird, I can't recreate that problem, I may need to see your code.
Long version:
A 'boolean' attribute in HTML is one that exists or does not. For example,
<div hidden>
Has a 'true' hidden attribute. In fact,
<div hidden='false'>
Still has a 'true' hidden attribute (because it exists).
Additionally, markup like
<div foo=''>
is not distinguishable (in DOM) from
<div foo>
In either case, the DOM interpretation of 'foo' is Boolean true.
We may want to tack away from the DOM standard and ignore 'boolean' attributes in favor of some other rules, but it's not decided yet.
if I have a custom component with an attribute foo="" that I publish and use {{foo}} in my component, I get "true" instead of the empty string.
Then I tried
and it gave "NaN" and got much slower. Dimitri said this second issue may already be fixed in WebKit.The text was updated successfully, but these errors were encountered: