title: Attach "DOMContentLoaded" to an iframe?
body: <p>So I create an iframe and it's supposed to continue reloading after a function runs. The function reads info that is in the iframe. Currently I have something like this (Which works);</p>
  
  <pre><code>function loaded(){
      alert(iframe.contentDocument.getElementsByClassName("blah")[0].innerHTML);
      iframe.src = filePath; //reloads the iframe
  }
  
  iframe.onload = loaded;
  </code></pre>
  
  <p>Because i'de like it to execute faster, would something like this work; Where the function runs as soon as the iframe has loaded the DOM;</p>
  
  <pre><code>function loaded(){
      alert(iframe.contentDocument.getElementsByClassName("blah")[0].innerHTML);
      iframe.src = filePath; //reloads the iframe
  }
  
  iframe.addEventListener("DOMContentLoaded", loaded, false);
  </code></pre>