3 ms·
You need some JS to change an attribute as much as you need JS to change a property. What am I missing? I hope the command attribute (https://developer.mozilla
by WickyNilliams 10mo ago
You need some JS to change an attribute as much as you need JS to change a property. What am I missing?
I hope the command attribute (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#command https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...) will eventually support this out of the box. In the meanwhile you can write a single custom --toggle command which is generic and works with any toggleable element