mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix DOM watcher not reporting removal of elements
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1392
Regression from:
- 6112a68faf
This commit is contained in:
parent
2f841259ae
commit
cb71fb494c
1 changed files with 2 additions and 2 deletions
|
|
@ -362,7 +362,7 @@ vAPI.SafeAnimationFrame = class {
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://github.com/chrisaljoudi/uBlock/issues/205
|
// https://github.com/chrisaljoudi/uBlock/issues/205
|
||||||
// Do not handle added node directly from within mutation observer.
|
// Do not handle added node directly from within mutation observer.
|
||||||
const observerHandler = function(mutations) {
|
const observerHandler = function(mutations) {
|
||||||
let i = mutations.length;
|
let i = mutations.length;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
|
|
@ -376,7 +376,7 @@ vAPI.SafeAnimationFrame = class {
|
||||||
removedNodeLists.push(nodeList);
|
removedNodeLists.push(nodeList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( addedNodeLists.length !== 0 || removedNodes ) {
|
if ( addedNodeLists.length !== 0 || removedNodeLists.length !== 0 ) {
|
||||||
safeObserverHandlerTimer.start(
|
safeObserverHandlerTimer.start(
|
||||||
addedNodeLists.length < 100 ? 1 : undefined
|
addedNodeLists.length < 100 ? 1 : undefined
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue