Add Symbol.iterator method to NodeList, as well as methods `keys()`, `values()`, `entries()` and `forEach()`. This will allow NodeList to be traversed via ES6 iteration statements: for (let node of document.querySelectorAll('.my-class') { ... } ... or via document.querySelectorAll('.my-class').forEach(node => { ... }

Documentation

Specification

Specification link


Final published standard: Recommendation, Living Standard, Candidate Recommendation, or similar final form

Status in Chromium

Blink


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owner

Comments

In Safari 10, Firefox 50, Chrome 51, Opera 38.

Search tags

NodeList, Iterable, @@iterator,

Last updated on 2020-11-09