Updated Procedural cosmetic filters (markdown)

Raymond Hill 2024-06-20 14:27:30 -04:00
parent e61d8403ec
commit 475b995102
1 changed files with 12 additions and 0 deletions

@ -159,6 +159,18 @@ Typically this procedural operator is used as first operator in a procedural cos
*** ***
### `subject:matches-prop(arg)`
- Description: Allows to select an element by a property name (or chain of properties), and optionally the property value.
- Chainable: Yes
- `subject`: Can be a plain CSS selector, or a procedural cosmetic filter.
- `arg`: A declaration in the form `chain=value`, `chain="value"`, or `chain=/regex/`, where `chain` is a dot-separated string for the target property, and `value` is the optional property value to match. `value` can be literal text or literal regular expression. When no `value` is declared, the operator only tests for the presence of the target property.
- Example:
- `example.org##div:matches-prop(imanad)`
- `example.org##img:matches-prop(naturalWidth=160)`
***
### `subject:min-text-length(n)` ### `subject:min-text-length(n)`
- Description: DOM elements whose text length is greater than or equal to `n` will be selected. - Description: DOM elements whose text length is greater than or equal to `n` will be selected.