Abandoned? When? I still use this pretty much everywhere to create HTML tables. Do people use something else now?
Yes, React
Do you know that there is an HTML tables API?
61–70 of 206 posts
Re: Do you know that there is an HTML tables API?
#62Earlier quoted context omitted.
A bike-shedding thread on top as usual.
Yeah I see this a lot on HN. I think people feel the need to make precise and accurate statements about things. I think a lot of them, if they'd deep breath and waited 30 minutes, they wouldn't comment.
Re: Do you know that there is an HTML tables API?
#63Earlier quoted context omitted.
Yep, didn’t realize this was unknown by enough web developers to warrant an article.
I see new frontend developers using for building buttons, and I've even seen people using for doing titles! Us greybeards don't know how much apparent knowledge we're sitting on, it seems.
Re: Do you know that there is an HTML tables API?
#64Re: Do you know that there is an HTML tables API?
#65Re: Do you know that there is an HTML tables API?
#66Interesting, but the JavaScript examples hurt: let table = [ ['one','two','three'], ['four','five','six'] ]; let b = document.body; let t = document.createElement('table'); b.appendChild(t); table.forEach((row,ri) => { let r = t.insertRow(ri); row.forEach((l,i) => { let c = r.insertCell(i); c.innerText = l; }) }); Use full words for variable names!
If you're going to use short names at least make it clear which belong together. Especially don't use different lengths when things ought to be similar.
data.forEach((row,i) => row.forEach((ele,j) => ... ))Re: Do you know that there is an HTML tables API?
#67Re: Do you know that there is an HTML tables API?
#68Earlier quoted context omitted.
The worst thing on the modern web is people using divs for table data. What do you mean this table isn’t sortable? M365 Admin is the worst offender I’ve come across on this. Just terrible table implementations on almost every page.
Is there a term for the opposite of cargo culting? Where everyone avoids something, but no one remembers why? Because that’s basically where HTML tables have ended up.
I'm not sure if I read that that specific experiment was debunked or not, but it certainly sounds familiar to how some developer trends get propagated even though the ground truth as changed.
Re: Do you know that there is an HTML tables API?
#69That's nice, but isn't that what the standard DOM methods are already doing? Or does that API have any additional abilities?
Nevertheless, that's really cool and potentially saves a lot of tedious and error-prone DOM navigation.