package
0.0.9
Repository: https://github.com/benoitkugler/webrender.git
Documentation: pkg.go.dev

# README

selector

The selector package implements CSS selectors for use with the parse trees produced by the html package.

It is based on andybalholm/cascadia commit 8919e381b2b9868b86bb29a833d893796a188f1f, with some API simplification.

# Functions

Filter returns the nodes that match m.
MatchAll returns a slice of the nodes that match the selector, from n and its children.
MatchFirst returns the first node that matches s, from n and its children.
MustCompile is like ParseGroup, but panics instead of returning an error.
Parse parses a single selector, with support for pseudo-element.
ParseGroup parses a selector, or a group of selectors separated by commas.
Query returns the first node that matches m, from the descendants of n.
QueryAll returns a slice of all the nodes that match m, from the descendants of n.

# Interfaces

Matcher is the interface for basic selector functionality.
Sel is the interface for all the functionality provided by selectors.

# Type aliases

A SelectorGroup is a list of selectors, which matches if any of the individual selectors matches.
Specificity is the CSS specificity as defined in https://www.w3.org/TR/selectors/#specificity-rules with the convention Specificity = [A,B,C].