title: JavaScript event window.onload not triggered
body: <p>I've got the following code in a website:</p>
  
  <pre><code> window.onload = resize;
   window.onresize = resize;
  
   function resize(){
    heightWithoutHeader = (window.innerHeight - 85) + "px"; 
    document.getElementById("main-table").style.height = heightWithoutHeader;
    document.getElementById("navigation").style.height = heightWithoutHeader;
   }
  </code></pre>
  
  <p>The <code>onresize</code> works fine, but the <code>onload</code> event never fires. I've tried it in Firefox and Chrome and neither of them works.</p>
  
  <p>Thank you for your help and go for the reputation! ;D</p>