@samitouri / QOS-React-2 / commits / dfb4dde8fd

keep track of incomplete

Thomas Aylott committed Nov 6, 2013 at 15:17 UTC dfb4dde8fdedd6a9df3026afae2acb9fa9288ca3
1 file changed +2
test/testImageURL.browser.js
+2
@@ -28,6 +28,7 @@ function testImageURL(url, timeout, callback){
28 testImageURL.getImage(function(img, done){
29 function callbackWrapper(error, event){
30 callbackWrapper = testImageURL.noop;
31 + testImageURL.running = (testImageURL.running || 0) - 1;
32 clearTimeout(timer);
33 done(img);
34 img = url = timeout = null;
@@ -41,6 +42,7 @@ function testImageURL(url, timeout, callback){
42 img.onload = function(event){ callbackWrapper(null, event || window.event); };
43 img.onerror = function(error){ callbackWrapper(error); };
44 img.src = url;
45 + testImageURL.running = (testImageURL.running || 0) + 1;
46
47 if (img.complete === true
48 || img.readyState == 4