Hacker News

Favorites Setup
Comment by hk__2 | original | HTML Can Do That
[−]hk__2 · 2026-08-20 Thu 19:46 UTC · link
> Want sortable tables? Get a jquery plugin and spend five minutes, done.

I want sortable tables without having to rely on a third-party plugin to a third-party library. HTML describes content, not just layout. It would be a `sortable` attribute on the table, just like you already have attributes that have nothing to do with layout such as `autocomplete` or `aria-*`.

[−]krapp · 2026-08-20 Thu 20:13 UTC · link
Everyone already complains that browsers are too bloated and now you want to have every browser support sortable tables when a single, simple JS file would work?
[−]ducktective · 2026-08-20 Thu 20:46 UTC · link
>single, simple JS file

It's all fine and dandy until marketing bros decide to shove all kinds of shady modals into that JS file. The JS side is not exclusive to trivial interactivity.

[−]krapp · 2026-08-20 Thu 20:57 UTC · link
What "marketing bros?"

It's open source software. You can see what it does, and you just put it on your server. We're talking about pre NPM javascript here, no continuous deployment, everything is vendored and local and no one is going to change that file without your knowledge and permission. And if someone does, you have much bigger problems on your hands.

What you can't own and control is the browser vendors and how they choose to implement things, or not to. You can edit a JS file to your specific needs, but you're stuck with whatever the browser decides.

[−]ducktective · 2026-08-21 Fri 02:25 UTC · link
My point was, people block js of websites by default. Why? Cause website devs abuse js and don't exclusively use it for basic interactivity of stuff like sorting table columns.

There is an incentive to use HTML for common interactivity purposes.

[−]ndriscoll · 2026-08-20 Thu 21:40 UTC · link
The overwhelming majority of web pages are static documents, and it's a document format, so basic document primitives make sense. Same with something like line charts or pie charts. Bloat is things like USB APIs that present obnoxious security surfaces.