package cascadia
import "github.com/andybalholm/cascadia"
Package cascadia is an implementation of CSS selectors.
Index ¶
Types ¶
type Selector ¶
A Selector is a function which tells whether a node matches or not.
func Compile ¶
Compile parses a selector and returns, if successful, a Selector object that can be used to match against html.Node objects.
func MustCompile ¶
MustCompile is like Compile, but panics instead of returning an error.
func (Selector) Filter ¶
Filter returns the nodes in nodes that match the selector.
func (Selector) Match ¶
Match returns true if the node matches the selector.
func (Selector) MatchAll ¶
MatchAll returns a slice of the nodes that match the selector, from n and its children.
func (Selector) MatchFirst ¶
MatchFirst returns the first node that matches s, from n and its children.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
fuzz |
- Version
- v1.0.0
- Published
- Feb 20, 2018
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- now –
Tools for package owners.