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
With attributes that only their presense is checked (like disable) we can not remove them with the method attr().
PROPOSED SOLUTION
To be able to send false as value if we want to remove the attribute (in case that we want to set "false" as a attribute value we can send it as string):
attr(elem, "disabled", false)
Right now false has the same behaviour as null and it returns the attribute value.
ALTERNATIVE SOLUTION
New method to remove attributes. Still the other solution seems better to me as we can do things like attr(elem, "disabled", checkbox.checked).
The text was updated successfully, but these errors were encountered:
We'll introduce a couple of new methods for now (see #54) to be able to remove attributes and data-*, but for the sake of reference, we also discussed the following ideas:
attr(elem, "disabled", { remove: true }) => new explicit API to force remove
PROBLEM
With attributes that only their presense is checked (like
disable
) we can not remove them with the methodattr()
.PROPOSED SOLUTION
To be able to send
false
as value if we want to remove the attribute (in case that we want to set "false" as a attribute value we can send it as string):Right now
false
has the same behaviour asnull
and it returns the attribute value.ALTERNATIVE SOLUTION
New method to remove attributes. Still the other solution seems better to me as we can do things like
attr(elem, "disabled", checkbox.checked)
.The text was updated successfully, but these errors were encountered: