mirror of https://github.com/gorhill/uBlock.git
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) ) {
|
||||
document.addEventListener('load', start, { once: true });
|
||||
self.addEventListener('load', start, { once: true });
|
||||
} else if ( document.readyState === 'loading' ) {
|
||||
document.addEventListener('DOMContentLoaded', start, { once: true });
|
||||
self.addEventListener('DOMContentLoaded', start, { once: true });
|
||||
} else {
|
||||
start();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue