<p dir="auto">Would you please add iterator in NodeList interface as <a href="https://dom.spec.whatwg.org/#old-style-collections" rel="nofollow">DOM4 spec</a> says?</p>
<div class="highlight highlight-source-webidl notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="IDL[Exposed=Window]
interface NodeList# {
  getter Node? item(unsigned long index#);
  readonly attribute unsigned long length;
  iterable&lt;Node&gt;;
};"><pre class="notranslate">IDL[<span class="pl-k">Exposed</span>=<span class="pl-k">Window</span>]
<span class="pl-k">interface</span> <span class="pl-en">NodeList</span># {
  getter Node? item(<span class="pl-k">unsigned</span> <span class="pl-k">long</span> index#);
  readonly attribute <span class="pl-k">unsigned</span> <span class="pl-k">long</span> length;
  iterable&lt;Node&gt;;
};</pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="NodeList.prototype[Symbol.iterator]
// gives `function [Symbol.iterator]()` in Firefox console"><pre class="notranslate"><span class="pl-v">NodeList</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">]</span>
<span class="pl-c">// gives `function [Symbol.iterator]()` in Firefox console</span></pre></div>
<p dir="auto">Update: This issue is now only for the following collections:</p>
<ul dir="auto">
<li>MediaList</li>
<li>StyleSheetList</li>
<li>CSSRuleList</li>
</ul>
<p dir="auto">Originally it was about NodeList as well, but that was fixed (along with DOMTokenList) in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="85519980" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3393" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/3393/hovercard" href="https://github.com/microsoft/TypeScript/pull/3393">#3393</a></p>
<hr>
<p dir="auto">Original:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var paragraphs = document.querySelectorAll(&quot;p&quot;);
for (let p of paragraphs) {
    console.log(p);
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">paragraphs</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">querySelectorAll</span><span class="pl-kos">(</span><span class="pl-s">"p"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">p</span> <span class="pl-k">of</span> <span class="pl-s1">paragraphs</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foo.ts(2,15): error TS2488: The right-hand side of a 'for...of' statement must have a '[Symbol.iterator]()' method that returns an iterator."><pre class="notranslate"><code class="notranslate">foo.ts(2,15): error TS2488: The right-hand side of a 'for...of' statement must have a '[Symbol.iterator]()' method that returns an iterator.
</code></pre></div>
<p dir="auto">Seems it just needs an update to lib.es6.d.ts to add the <code class="notranslate">[Symbol.iterator()]</code> to all the collections that have an indexer and length property. <del>The ones I found that have it in Nightly are below. The rest were either IE-only or didn't exist.</del> Removed my list since it seems FF has more than the specs allow. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="118683757" data-permission-text="Title is private" data-url="https://github.com/zloirock/core-js/issues/137" data-hovercard-type="issue" data-hovercard-url="/zloirock/core-js/issues/137/hovercard?comment_id=159531781&amp;comment_type=issue_comment" href="https://github.com/zloirock/core-js/issues/137#issuecomment-159531781">zloirock/core-js#137 (comment)</a> for a more accurate list.</p>