Ensuring common iterable DOM classes can be used in for/of loops.
// works from Chrome 51 on, not before
for (const node of document.querySelectorAll('*'))
console.log(node);
- CDN via https://unpkg.com/@ungap/dom-iterable
- ESM via
import iterator from '@ungap/dom-iterable'
- CJS via
const iterator = require('@ungap/dom-iterable')