title: bs-webapi - How to loop over Dom.nodeList?
body: <p>The following won't work since sides is a <code>Dom.nodeList</code> and <code>DomTokenList.forEach</code> expects a <code>Dom.domTokenList</code>.</p>
  
  <pre><code>open Bs_webapi.Dom;
  
  external length : Dom.nodeList =&gt; int = "" [@@bs.get];
  
  let sides = Document.querySelectorAll "#carousel &gt; figure" document;
  
  DomTokenList.forEach (fun item _ =&gt; print_endline item) (sides);
  </code></pre>