mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Also dispatch loadend
event in case of match
Related issue: - https://github.com/AdguardTeam/Scriptlets/issues/199
This commit is contained in:
parent
cef36518ed
commit
b76d7c6af6
@ -1253,18 +1253,9 @@
|
|||||||
status: { value: 200, writable: false },
|
status: { value: 200, writable: false },
|
||||||
statusText: { value: 'OK', writable: false },
|
statusText: { value: 'OK', writable: false },
|
||||||
});
|
});
|
||||||
if ( this.onreadystatechange !== null ) {
|
this.dispatchEvent(new Event('readystatechange'));
|
||||||
setTimeout(( ) => {
|
this.dispatchEvent(new Event('load'));
|
||||||
const ev = new Event('readystatechange');
|
this.dispatchEvent(new Event('loadend'));
|
||||||
this.onreadystatechange.call(this, ev);
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
if ( this.onload !== null ) {
|
|
||||||
setTimeout(( ) => {
|
|
||||||
const ev = new Event('load');
|
|
||||||
this.onload.call(this, ev);
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
@ -1364,9 +1355,11 @@
|
|||||||
// https://github.com/uBlockOrigin/uAssets/issues/8
|
// https://github.com/uBlockOrigin/uAssets/issues/8
|
||||||
/// alert-buster.js
|
/// alert-buster.js
|
||||||
(function() {
|
(function() {
|
||||||
window.alert = function(a) {
|
window.alert = new Proxy(window.alert, {
|
||||||
console.info(a);
|
apply: function(a) {
|
||||||
};
|
console.info(a);
|
||||||
|
},
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user