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

Method Prev

traversal.go:333–335  ·  view source on GitHub ↗

Prev gets the immediately preceding sibling of each element in the Selection. It returns a new Selection object containing the matched elements.

()

Source from the content-addressed store, hash-verified

331// Prev gets the immediately preceding sibling of each element in the
332// Selection. It returns a new Selection object containing the matched elements.
333func (s *Selection) Prev() *Selection {
334 return pushStack(s, getSiblingNodes(s.Nodes, siblingPrev, nil, nil))
335}
336
337// PrevFiltered gets the immediately preceding sibling of each element in the
338// Selection filtered by a selector. It returns a new Selection object

Callers 5

TestPrevFunction · 0.80
TestPrevRollbackFunction · 0.80
TestPrev2Function · 0.80
TestPrevNoneFunction · 0.80
BenchmarkPrevFunction · 0.80

Calls 2

pushStackFunction · 0.85
getSiblingNodesFunction · 0.85

Tested by 5

TestPrevFunction · 0.64
TestPrevRollbackFunction · 0.64
TestPrev2Function · 0.64
TestPrevNoneFunction · 0.64
BenchmarkPrevFunction · 0.64