You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionIsImageOk(img){// During the onload event, IE correctly identifies any images that// weren't downloaded as not complete. Others should too. Gecko-based// browsers act like NS4 in that they report this incorrectly.if(!img.complete){returnfalse;}// However, they do have two very useful properties: naturalWidth and// naturalHeight. These give the true size of the image. If it failed// to load, either of these should be zero.if(img.naturalWidth===0){returnfalse;}// No other way of checking: assume it's ok.returntrue;}IsImageOk(document.querySelector('.img'))