667
edits
Changes
→Step 1. Write a Test Case
<pre>
var img = document.querySelector('#image-1234');
img.src = "http://some.url.com/image";
...
// Some where late in the code I set the URL to the same thing again
img.src = "http://some.url.com/image";
// I'd expect the onload event to fire a second time, but it doesn't always in this case!
Later on, I sometimes need to reset the image, and in some cases, it needs to use the same URL again. I expect to get an onload event firing every time I change the img.src, no matter what the URL is.