mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Listen to load events on window, not document
Related feedback:
- 0f330c7359 (r45774155)
This commit is contained in:
parent
07035789a4
commit
5fa873960f
@ -707,9 +707,9 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
if ( document.readyState !== 'complete' && /\bcomplete\b/.test(behavior) ) {
|
if ( document.readyState !== 'complete' && /\bcomplete\b/.test(behavior) ) {
|
||||||
document.addEventListener('load', start, { once: true });
|
self.addEventListener('load', start, { once: true });
|
||||||
} else if ( document.readyState === 'loading' ) {
|
} else if ( document.readyState === 'loading' ) {
|
||||||
document.addEventListener('DOMContentLoaded', start, { once: true });
|
self.addEventListener('DOMContentLoaded', start, { once: true });
|
||||||
} else {
|
} else {
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user