title: javascript, image onload() doesnt fire in webkit if loading same image
body: <p>I have an <code>&lt;img&gt;</code> element and I'm changing its <code>src</code> attribute. The element has an <code>onload</code> handler function attached. Each time i change the src attribute and the image loads the handler function should run. </p>
  
  <p>In Chrome and Safari, if I assign the same src as the one before, the handler function is not run. Before assigning that same src as before i've tried <code>imgElement.src=''</code>, <code>imgElement.src= null</code>, <code>imgElement.src='notExistingFile.jpg'</code> and none of it works.</p>
  
  <p>Please help. Anyone had this problem before?</p>
  
  <p><strong>Edit</strong>: it worked by doing imgElement.src = '' before assigning the same src as before:</p>
  
  <pre><code>imgElement.src = '';
  imgElement.src = 'image.jpg';
  </code></pre>