title: onload event not firing in IE9 if register event when readyState is loading
body: <p>I try to place multiple images in my HTML, and manipulate them when they are all loaded.</p>
  
  <p>But onload event is not firing in IE9 sometimes.</p>
  
  <p>I set some console debug message, and found that if the readyState of image is loading when I register onload event, onload event will not fire.</p>
  
  <p>Code snippet is as follows:</p>
  
  <pre><code>var loaded = function () {
      // increate counter to make sure all images are loaded or not
  };
  
  var thumbnails = $('img');
  thumbnails.each(function () {
      console.log('this.readyState:'+this.readyState)
  
      if (this.complete) {
          loaded();
      } else {
          this.onload = loaded;
      }
  });
  </code></pre>
  
  <p>P.S. I don't want to use window.onload method, because my script may be a plugin, it will be insert someone's page.</p>