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

Method PrevMatcher

traversal.go:347–349  ·  view source on GitHub ↗

PrevMatcher gets the immediately preceding sibling of each element in the Selection filtered by a matcher. It returns a new Selection object containing the matched elements.

(m Matcher)

Source from the content-addressed store, hash-verified

345// Selection filtered by a matcher. It returns a new Selection object
346// containing the matched elements.
347func (s *Selection) PrevMatcher(m Matcher) *Selection {
348 return filterAndPush(s, getSiblingNodes(s.Nodes, siblingPrev, nil, nil), m)
349}
350
351// PrevAll gets all the preceding siblings of each element in the
352// Selection. It returns a new Selection object containing the matched elements.

Callers 1

Calls 2

filterAndPushFunction · 0.85
getSiblingNodesFunction · 0.85

Tested by

no test coverage detected