title: Javascript DOMContentLoaded event not firing in Internet Explorer
body: <p>I have the following code to attach a function to the <code>DOMContentLoaded</code> event, but the function is never called in Internet Explorer 11</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>if (document.addEventListener) {
     document.addEventListener("DOMContentLoaded", init, false);
  }
  else {
     document.attachEvent("onDOMContentLoaded", init);
  }
  </code></pre>