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 => { ... }

Specification

Established standard

Status in Chromium

Blink


Enabled by default (tracking bug) in:

  • Chrome for desktop release 51
  • Chrome for Android release 51
  • Android WebView release 51

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