IE9 is showing false complete
property with the following:
$("<img/>",{src:"http://farm2.static.flickr.com/1104/1434841504_edc671e65c.jpg"}).each(function(){console.log(this.complete);});
If you run this code in a browser console, (allow enough time for the image to load) then run it again. IE9 is the only browser I've tested showing false the second time. This seems to be a known bug, from some simple google searching. I need a workaround if anyone has one.
This could be a timing issue, as letting the code above set a global variable a la:
var img = $("<img....
and then testing that variable's properties gives different results:
img[0].complete === true
and
img[0].readyState === "complete"
There must be some other way of getting this infomation. Any ideas... Thanks!
if( image.complete || image.readyState == "complete" )
is how you would test if its cachednaturalWidth
ornaturalHeight
seem to return useful values... I'll test this more and answer if/when I can.