Skip to content

Commit

Permalink
keep track of incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
subtleGradient committed Nov 6, 2013
1 parent 159d64d commit dfb4dde
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/testImageURL.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function testImageURL(url, timeout, callback){
testImageURL.getImage(function(img, done){
function callbackWrapper(error, event){
callbackWrapper = testImageURL.noop;
testImageURL.running = (testImageURL.running || 0) - 1;
clearTimeout(timer);
done(img);
img = url = timeout = null;
Expand All @@ -41,6 +42,7 @@ function testImageURL(url, timeout, callback){
img.onload = function(event){ callbackWrapper(null, event || window.event); };
img.onerror = function(error){ callbackWrapper(error); };
img.src = url;
testImageURL.running = (testImageURL.running || 0) + 1;

if (img.complete === true
|| img.readyState == 4
Expand Down

0 comments on commit dfb4dde

Please sign in to comment.