News for hackers. Stuff that matters.
Re:Abandonware of the web: do you know that there is an HTML... by Sharlin on Saturday November 01, 2025 @10:16AM (#45781810)
Are you sure this old API does the right thing with for…of?
Re:Abandonware of the web: do you know that there is an HTML... by runarberg on Saturday November 01, 2025 @11:43AM (#45782560)
Should work just fine:

    > document.createElement("table").rows[Symbol.iterator]()
    // Array Iterator { constructor: Iterator() }
HTMLTableElement.prototype.rows actually just returns a HTMLCollection, so same as document.forms, or document.getElementsByClassName. HTMLCollection implements Symbol.iterator as you would expect.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableEl...

Re:Abandonware of the web: do you know that there is an HTML... by kaoD on Saturday November 01, 2025 @10:44AM (#45782000)
It's only used to iterate the array
Re:Abandonware of the web: do you know that there is an HTML... by Sharlin on Saturday November 01, 2025 @10:55AM (#45782103)
Oops, right, I confused the variables.