Hasty Briefsbeta

Bilingual

Abandonware of the web: do you know that there is an HTML tables API?

6 months ago
  • #JavaScript
  • #HTML
  • #Web Development
  • HTML tables have a forgotten API that allows manipulation without re-rendering the entire table.
  • The API supports creating tables from nested arrays, adding/deleting rows and cells, and accessing cells by index.
  • Example code demonstrates creating a table from an array and manipulating rows and cells.
  • Limitations include odd syntax (e.g., `-1` to add a row at the end) and inability to create `TH` elements.
  • Suggests revisiting the API to add more functionality, similar to enhancements made to HTML forms.