News for hackers. Stuff that matters.
Re:You don't need JavaScript for that by unsupp0rted on Saturday December 02, 2023 @10:48AM (#38499399)
Vanilla JavaScript is supported natively by all web browsers now.

Nobody is suggesting using a 20mb framework to make a toggle switch work on a standalone page that isn’t a web app.

If you’re building a web app either way, then choosing between a screen full of CSS or a handful of lines of js is negligible.

For expanding sections, you should use native HTML elements when they do the job with less effort/code. You should use JS when they don’t.

Re:You don't need JavaScript for that by perilunar on Saturday December 02, 2023 @11:15PM (#38504791)
> Vanilla JavaScript is supported natively by all web browsers now.

What a strange statement. 'Vanilla' JS has been supported 'natively' in browsers since the late 90s.