title: Will setting the image.src to itself cause onLoad to fire?
body: <p>I can't seem to find a definitive answer to this one...</p>
  
  <p>Assume I have a JavaScript reference to an image on the page and I bind a <code>load</code> event handler to that element. For example, something like this:</p>
  
  <hr>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;img id="myImage" src="http://example.com/image.jpg" /&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>var $myImage = $('#myImage');
  $myImage.load(function() {
      alert('Image loaded!')
  });
  </code></pre>
  
  <hr>
  
  <p>Now, if I do this:</p>
  
  <pre><code>var imageElem = $myImage[0];
  imageElem.src = imageElem.src; // Re-assign the image source path
  </code></pre>
  
  <p>...will the <code>load</code> event handler fire <em>even if the image has already been loaded from the server</em>? It seems to do in Firefox, but is it safe to rely on this behaviour?</p>
  
  <p>(The reason I ask is I've seen this used in a jQuery plugin to check when all images have been loaded. If the image is loaded before the <code>load</code> event handler is bound, then it won't fire, unless it's re-triggered using the method above.)</p>