1
0
Fork 0
Browse Source

Check XHR state before aborting

master
Gregory Eremin 9 years ago
parent
commit
53e8d361df
  1. 9
      background.js

9
background.js

@ -51,8 +51,13 @@ @@ -51,8 +51,13 @@
log('The mouse is OUT!');
if (STORAGE[i].xhr !== undefined) {
STORAGE[i].xhr.abort();
log('XHR aborted!');
var state = STORAGE[i].xhr.readyState,
done = STORAGE[i].xhr.DONE;
if (state !== done) {
STORAGE[i].xhr.abort();
log('XHR aborted!');
}
}
window.clearTimeout(STORAGE[i].load_timeout);
window.clearTimeout(STORAGE[i].show_timeout);

Loading…
Cancel
Save