mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
code review re. #1772: fixed previewing of :has() filters
This commit is contained in:
parent
889bf17545
commit
6557024434
1 changed files with 4 additions and 3 deletions
|
@ -779,10 +779,11 @@ var filterToDOMInterface = (function() {
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var out = [];
|
var out = [], elem;
|
||||||
for ( var i = 0, n = elems.length; i < n; i++ ) {
|
for ( var i = 0, n = elems.length; i < n; i++ ) {
|
||||||
if ( document.querySelector(arg) ) {
|
elem = elems[i];
|
||||||
out.push({ type: 'cosmetic', elem: elems[i] });
|
if ( elem.querySelector(arg) ) {
|
||||||
|
out.push({ type: 'cosmetic', elem: elem });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
|
|
Loading…
Reference in a new issue