desandro/imagesloaded — pull request #11 by Darsain (2011-11-24 21:36:06+00:00)
Title: Fixed loaded images check

Following the comment in **justinhillsjohnson** pull request...

As I've been unable to find a reliable cross-browser method to determine that image has finished loading (working for broken and non-broken images), so I came up with this solution.

It basically resets all `this.src` attributes available without any condition requirement, while caching the images that already received proper load/error event, and checking the new load/error event source against this array.

It works flawlessly everywhere (at least I've tried to do the best to check this in IE 6, IE7, IE8, IE9, FF8, Opera 11.52, Chrome 15, and Safari 5.1.1), but as I've mentioned in previous pull request, changing the `src` attribute while the image is loading might have some negative effect?? ... haven't noticed anything, but please share your thoughts.