1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00
Raymond Hill 2018-08-14 14:32:56 -04:00
parent 27dc7ba6f8
commit dc430f1eff
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -66,8 +66,14 @@ vAPI.DOMFilterer = function() {
this.excludedNodeSet = new WeakSet(); this.excludedNodeSet = new WeakSet();
this.addedCSSRules = new Set(); this.addedCSSRules = new Set();
// https://github.com/uBlockOrigin/uBlock-issues/issues/167
// By the time the DOMContentLoaded is fired, the content script might
// have been disconnected from the background page. Unclear why this
// would happen, so far seems to be a Chromium-specific behavior at
// launch time.
if ( this.domIsReady !== true ) { if ( this.domIsReady !== true ) {
document.addEventListener('DOMContentLoaded', ( ) => { document.addEventListener('DOMContentLoaded', ( ) => {
if ( vAPI instanceof Object === false ) { return; }
this.domIsReady = true; this.domIsReady = true;
this.commit(); this.commit();
}); });