Live data from Hacker News

Do you know that there is an HTML tables API?

christianheilmann.com

191–200 of 206 posts

Re: Do you know that there is an HTML tables API?

#191
post #176
post #23

It is similar as with buttons ( https://news.ycombinator.com/item?id=45774182 ). Not sure when it was (10-15 years ago), but at some point everything became s. So, instead of semantic markup, HTML became a UI toolbox.

I've been writing HTML for at least 20 years professionally and this has absolutely not been my experience. Yes, I've encountered some people using divs for everything but in the vast majority of cases people have used semantically correct HTML, at least when it comes to buttons.

> Yes, I've encountered some people using divs for everything but in the vast majority of cases people have used semantically correct HTML, at least when it comes to buttons.

I dunno; ISTR that the materializecss library used `` for buttons.

Re: Do you know that there is an HTML tables API?

#192

Phew, this post single handedly made me feel old this morning. I started dabbling with the web just over 20 years ago but have mainly been working on the backend the past 10-15 years. I had no clue that nowadays programmers don’t know about this, so I assume it’s supplanted by modern frameworks or modern JS/CSS

> Phew, this post single handedly made me feel old this morning.

I hear you!

For me though, it made me feel old for a different reason

I had first developed webapps in the late 90s (96 onwards) using cgi-bin, perl, etc. My first webapp, done for money, was something similar to MRTG.

At some point in the last almost-30-years) I had actually used this API! I have, however, forgotten all about it and was only reminded of it with this post.

So, yeah, I feel old because I can legitimately say to many modern web-devs that "I've forgotten more about web dev than you you currently know" :-)

Re: Do you know that there is an HTML tables API?

#193

Earlier quoted context omitted.

If by “Niche” you mean “not hype” then yes, but the PHP+jQuery combo is still very widely used in 2025 (likely more than React, given WordPress market share alone).

Sure! But if you render server side (as with PHP), you'd likely just build up your table on the server rather than dynamically on the client, so you would also not use these imperative table element specific APIs. Even if, for some reason, you were filling in the table content dynamically via jQuery, I think the fashion there was also to just pass in whole HTML markup snippets as strings to be injected into the DOM,…

JS hasn't been invented to render on the client side but to allow interactivity.

Re: Do you know that there is an HTML tables API?

#194

Earlier quoted context omitted.

Sure! But if you render server side (as with PHP), you'd likely just build up your table on the server rather than dynamically on the client, so you would also not use these imperative table element specific APIs. Even if, for some reason, you were filling in the table content dynamically via jQuery, I think the fashion there was also to just pass in whole HTML markup snippets as strings to be injected into the DOM,…

JS hasn't been invented to render on the client side but to allow interactivity.

What does that have to do with anything? The question was what do people use ‘now’ instead of this imperative table manipulation API, I’m unsure where you disagree with me.

Re: Do you know that there is an HTML tables API?

#195

I feel like IndexedDB is becoming this abandonware as well. There are so many ways where this (IMO rather badly designed) API can be improved but the standards committee seems completely uninterested. Even things like adding BigInt as primative is unimplemented. I fear this will be even worse now that we have the origin File System API and people can bring their own database engines (like web-assambled SQLite). But f…

What has stalled with IndexedDB and BigInt?

Re: Do you know that there is an HTML tables API?

#196

Earlier quoted context omitted.

JS hasn't been invented to render on the client side but to allow interactivity.

What does that have to do with anything? The question was what do people use ‘now’ instead of this imperative table manipulation API, I’m unsure where you disagree with me.

It has to do with your previous comment…

> But if you render server side (as with PHP), you'd likely just build up your table on the server rather than dynamically on the client, so you would also not use these imperative table element specific APIs.

Re: Do you know that there is an HTML tables API?

#197

Earlier quoted context omitted.

What does that have to do with anything? The question was what do people use ‘now’ instead of this imperative table manipulation API, I’m unsure where you disagree with me.

It has to do with your previous comment… > But if you render server side (as with PHP), you'd likely just build up your table on the server rather than dynamically on the client, so you would also not use these imperative table element specific APIs.

I feel like this is going nowhere...

The question was: What do people use now to create HTML tables instead of the table manipulation API described in this blog post.

I said:

- If you render a table on the client (not what JS was originally built for, but what it is often used for now) using a framework like React, you declaratively render the table using its semantic elements (table, thead, tbody, tr, td etc.) instead of imperatively building it up using that API

- If you render a table on the server, you essentially do the same (output the table markup)

That's why I described the above mentioned table API as "niche", which you seem to have taken offense with but I still have no idea why.

Maybe you're suggesting that this API is commonly used to add interactivity to a table element on a page with JS? I could see it being used for that, no idea if it is, I still have the feeling that just using regular Element APIs is more common - the question was also about creating tables specifically, not manipulating them, so that's why I mentioned declarative frontend frameworks.

Re: Do you know that there is an HTML tables API?

#198
post #91

Will Google remove this API then if it’s abandoned? Topic is reminiscent of a submission from yesterday about XSLT: https://news.ycombinator.com/item?id=45779261

XSLT requires hundreds of thousands (maybe millions?) of lines of security-sensitive code. That's why it's proposed for removal. I doubt that's true for .insertCell() and .insertRow().

But the precedent isn’t fix the security sensitive insertCell() API, it is to remove it due to low usage. The number of lines is irrelevant IMO.

The Google deprecation notice fails to address why a gigantic company with nearly unlimited resources couldn’t implement this feature themselves instead of forcing a breaking change.

Re: Do you know that there is an HTML tables API?

#199

I feel like IndexedDB is becoming this abandonware as well. There are so many ways where this (IMO rather badly designed) API can be improved but the standards committee seems completely uninterested. Even things like adding BigInt as primative is unimplemented. I fear this will be even worse now that we have the origin File System API and people can bring their own database engines (like web-assambled SQLite). But f…

What has stalled with IndexedDB and BigInt?

Lack of interest from standards committee and browser vendors seems to be the only thing stalling:

https://github.com/w3c/IndexedDB/issues/230

I personally think that this stall is simply a symptom of the larger issue that the IndexedDB standard was bad to begin with, and that lead to lax adoption from developers, which deprioritized vendors from fixing the standard, leading to a vicious cycle where even a seemingly trivial issue like adding BigInt support goes unimplemented.

I personally think that IndexedDB is salvageable, and not only that, it has the potential to be an amazing web API. But the way things are progressing with the standards committee, I very much doubt it will be any better in the foreseeable future.

Re: Do you know that there is an HTML tables API?

#200

Earlier quoted context omitted.

What has stalled with IndexedDB and BigInt?

Lack of interest from standards committee and browser vendors seems to be the only thing stalling: https://github.com/w3c/IndexedDB/issues/230 I personally think that this stall is simply a symptom of the larger issue that the IndexedDB standard was bad to begin with, and that lead to lax adoption from developers, which deprioritized vendors from fixing the standard, leading to a vicious cycle where even a seemingly…

[deleted]
Post reply on HN