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?
[ Parent
| on HN ]
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...