From 475b9951028d8ebefcd8ab5c2990b958ecd6fda0 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 20 Jun 2024 14:27:30 -0400 Subject: [PATCH] Updated Procedural cosmetic filters (markdown) --- Procedural-cosmetic-filters.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Procedural-cosmetic-filters.md b/Procedural-cosmetic-filters.md index 4bf47b4..ef634d0 100644 --- a/Procedural-cosmetic-filters.md +++ b/Procedural-cosmetic-filters.md @@ -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)` - Description: DOM elements whose text length is greater than or equal to `n` will be selected.