File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
platform/mv3/extension/js/scripting Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,9 @@ class ProceduralFilterer {
486
486
this . styledNodes = new Set ( ) ;
487
487
this . timer = undefined ;
488
488
this . addSelectors ( selectors ) ;
489
+ // Important: commit now (do not go through onDOMChanged) to be sure
490
+ // first pass is going to happen asap.
491
+ this . uBOL_commitNow ( ) ;
489
492
}
490
493
491
494
addSelectors ( ) {
@@ -506,8 +509,6 @@ class ProceduralFilterer {
506
509
}
507
510
508
511
uBOL_commitNow ( ) {
509
- //console.time('procedural selectors/dom layout changed');
510
-
511
512
// https://github.com/uBlockOrigin/uBlock-issues/issues/341
512
513
// Be ready to unhide nodes which no longer matches any of
513
514
// the procedural selectors.
@@ -554,8 +555,8 @@ class ProceduralFilterer {
554
555
styleNodes ( nodes , styleToken ) {
555
556
if ( styleToken === undefined ) {
556
557
for ( const node of nodes ) {
557
- node . textContent = '' ;
558
558
node . remove ( ) ;
559
+ node . textContent = '' ;
559
560
}
560
561
return ;
561
562
}
You can’t perform that action at this time.
0 commit comments