Iterable NodeList

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

Comments

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

Documentation

Specification

Established standard

Status in Chromium

Blink


Enabled by default (launch bug) in:

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

Consensus & Standardization

  • Shipped
  • No public signals
  • Shipped
  • Strongly positive

Owner

Last updated on 2017-06-14