mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Listen to load events on window, not document
Related feedback:
- 0f330c7359 (r45774155)
This commit is contained in:
parent
07035789a4
commit
5fa873960f
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue