Are you sure this old API does the right thing with for…of?
It's only used to iterate the array
Oops, right, I confused the variables.
Should work just fine:
> document.createElement("table").rows[Symbol.iterator]() // Array Iterator { constructor: Iterator() }
https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableEl...
It's only used to iterate the array
Oops, right, I confused the variables.
Should work just fine:
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...