title: The window.onload event is not firing in IE8
body: <p>I stripped down this javascript to be as simple as possible, and it's still not working in IE8.</p>
  
  <pre><code>function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload !== 'function') {
      window.onload = func;
    } else {
      window.onload = function() {
        if (oldonload) {
          oldonload();
        }
        func();
      };
    }
  }
  
  function callkits() {
      alert('Kits: Bug testing');
  }
  
  //addLoadEvent(callkits);
  //window.onload = callkits;
  window.onload = function() {
      callkits();
  };
  </code></pre>
  
  <p>Neither of the two commented out methods, nor the active method, do anything in IE8. Javascript is enabled. (Calling <code>alert</code> directly, outside a function, does work.) I'm tearing my hair out here.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Okay, it's now even simpler:</p>
  
  <pre><code>alert('Before onload.')
  
  window.onload = function() {
      alert('Onload');
  };
  
  alert('After onload');
  </code></pre>
  
  <p>In Firefox, Opera, Safari, and Chrome, I get "Before onload", "After onload", then the page appears, then "Onload". In IE8, that last step doesn't happen. <code>window.onload</code> simply isn't firing.</p>