Check XHR state before aborting
This commit is contained in:
parent
5f97af68c7
commit
53e8d361df
|
@ -51,8 +51,13 @@
|
||||||
log('The mouse is OUT!');
|
log('The mouse is OUT!');
|
||||||
|
|
||||||
if (STORAGE[i].xhr !== undefined) {
|
if (STORAGE[i].xhr !== undefined) {
|
||||||
STORAGE[i].xhr.abort();
|
var state = STORAGE[i].xhr.readyState,
|
||||||
log('XHR aborted!');
|
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].load_timeout);
|
||||||
window.clearTimeout(STORAGE[i].show_timeout);
|
window.clearTimeout(STORAGE[i].show_timeout);
|
||||||
|
|
Loading…
Reference in New Issue