{ } qjs-modules

css3-selectors

Source: lib/css3-selectors.js (pure JS)

Builds CSS3 selector matchers out of composable predicate parts.

Exports

ExportArgsKindDescription
parseSelectors(s)1generatorParses a selector string, yielding selector matchers.
TypeSelector(tagName)1functionMatches elements by tag name.
ClassSelector(className)1functionMatches elements carrying a class.
IdSelector(id)1functionMatches an element by id.
AttributeSelector(...args)*functionMatches by attribute (name/operator/value).
PseudoClassSelector(pseudoClass)1functionMatches a pseudo-class.
LogicPredicate(pred=Predicate.or, ...args)1+functionCombines sub-selectors with a logical operator.