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

Method NotSelection

filter.go:66–71  ·  view source on GitHub ↗

NotSelection removes elements from the Selection that match a node in the specified Selection object. It returns a new Selection object with the matching elements removed.

(sel *Selection)

Source from the content-addressed store, hash-verified

64// NotSelection removes elements from the Selection that match a node in the specified
65// Selection object. It returns a new Selection object with the matching elements removed.
66func (s *Selection) NotSelection(sel *Selection) *Selection {
67 if sel == nil {
68 return pushStack(s, winnowNodes(s, nil, false))
69 }
70 return pushStack(s, winnowNodes(s, sel.Nodes, false))
71}
72
73// Intersection is an alias for FilterSelection.
74func (s *Selection) Intersection(sel *Selection) *Selection {

Callers 3

BenchmarkNotSelectionFunction · 0.80
TestNotSelectionFunction · 0.80
TestNotSelectionRollbackFunction · 0.80

Calls 2

pushStackFunction · 0.85
winnowNodesFunction · 0.85

Tested by 3

BenchmarkNotSelectionFunction · 0.64
TestNotSelectionFunction · 0.64
TestNotSelectionRollbackFunction · 0.64