DOMContentLoaded event isnt getting fired
<p>I execute this code in the head of the document:</p>

<pre><code> console.log('DOMContentLoaded event');
 document.addEventListener( "DOMContentLoaded", ready, false );
</code></pre>

<p>However, the function doesnt get called, even after the page is ready?
What is inside the console log does get printed</p>

<p>Notice that i add a javascript file dynamically (it is not hardcoded), and i think it is quite late in the script.. it is after the  window.onload event?
may it be the reason? any way I can trigger the event?</p>
