mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-02 00:42:45 +01:00
Test for unsupported pseudo operators after normalization
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2356
This commit is contained in:
parent
2e134a0c46
commit
b1a14794bf
@ -1549,15 +1549,14 @@ Parser.prototype.SelectorCompiler = class {
|
||||
|
||||
// Post-analysis
|
||||
// Mind https://w3c.github.io/csswg-drafts/selectors-4/#has-pseudo
|
||||
if ( data.name.startsWith('-abp-') ) {
|
||||
data.type = 'Error';
|
||||
return;
|
||||
}
|
||||
data.name = this.normalizedOperators.get(data.name) || data.name;
|
||||
if ( this.proceduralOperatorNames.has(data.name) ) {
|
||||
data.type = 'ProceduralSelector';
|
||||
} else if ( this.proceduralActionNames.has(data.name) ) {
|
||||
data.type = 'ActionSelector';
|
||||
} else if ( data.name.startsWith('-abp-') ) {
|
||||
data.type = 'Error';
|
||||
return;
|
||||
}
|
||||
if ( this.maybeProceduralOperatorNames.has(data.name) ) {
|
||||
if ( this.astHasType(args, 'ProceduralSelector') ) {
|
||||
|
Loading…
Reference in New Issue
Block a user