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

Method PrevFiltered

traversal.go:340–342  ·  view source on GitHub ↗

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

(selector string)

Source from the content-addressed store, hash-verified

338// Selection filtered by a selector. It returns a new Selection object
339// containing the matched elements.
340func (s *Selection) PrevFiltered(selector string) *Selection {
341 return filterAndPush(s, getSiblingNodes(s.Nodes, siblingPrev, nil, nil), compileMatcher(selector))
342}
343
344// PrevMatcher gets the immediately preceding sibling of each element in the
345// Selection filtered by a matcher. It returns a new Selection object

Callers 4

TestPrevFilteredFunction · 0.80
TestPrevFilteredInvalidFunction · 0.80
TestPrevFilteredRollbackFunction · 0.80
BenchmarkPrevFilteredFunction · 0.80

Calls 3

filterAndPushFunction · 0.85
getSiblingNodesFunction · 0.85
compileMatcherFunction · 0.85

Tested by 4

TestPrevFilteredFunction · 0.64
TestPrevFilteredInvalidFunction · 0.64
TestPrevFilteredRollbackFunction · 0.64
BenchmarkPrevFilteredFunction · 0.64