Re:Replacing JavaScript with Just HTML
by yurishimo on Sunday December 28, 2025 @03:46AM
(#46409504)
Because you need 20x the JS to do the same thing and it’s still not hardware accelerated. These new CSS properties are well supported and will only get better.
[ Parent
| on HN ]
<span onclick="
banana.
classlist.
toggle('hidden')
">click</span>
<div id="banana" class="hidden">loris</div>
Re:Replacing JavaScript with Just HTML
by spartanatreyu on Sunday January 04, 2026 @10:10PM
(#46494930)
That's a poor example since it isn't accessible and doesn't work if a pending JS or CSS network request is preventing it from functioning.
This is the HTML version, it's not susceptible to halted execution, and it is accessible.
<details>
<summary>Click</summary>
loris
</details>