MCPcopy
hub / github.com/PuerkitoBio/goquery / AddMatcher

Method AddMatcher

expand.go:17–19  ·  view source on GitHub ↗

AddMatcher adds the matcher's matching nodes to those in the current selection and returns a new Selection object. The matcher is run in the context of the document of the current Selection object.

(m Matcher)

Source from the content-addressed store, hash-verified

15// The matcher is run in the context of the document of the current
16// Selection object.
17func (s *Selection) AddMatcher(m Matcher) *Selection {
18 return s.AddNodes(findWithMatcher([]*html.Node{s.document.rootNode}, m)...)
19}
20
21// AddSelection adds the specified Selection object's nodes to those in the
22// current selection and returns a new Selection object.

Callers 1

TestSingleFunction · 0.80

Calls 2

AddNodesMethod · 0.95
findWithMatcherFunction · 0.85

Tested by 1

TestSingleFunction · 0.64