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

Method RemoveFiltered

manipulation.go:243–245  ·  view source on GitHub ↗

RemoveFiltered removes from the current set of matched elements those that match the selector filter. It returns the Selection of removed nodes. For example if the selection s contains " ", " " and " " and s.RemoveFiltered("h2") is called, only the " " node is removed (and returned), wh

(selector string)

Source from the content-addressed store, hash-verified

241// and s.RemoveFiltered("h2") is called, only the "<h2>" node is removed
242// (and returned), while "<h1>" and "<h3>" are kept in the document.
243func (s *Selection) RemoveFiltered(selector string) *Selection {
244 return s.RemoveMatcher(compileMatcher(selector))
245}
246
247// RemoveMatcher removes from the current set of matched elements those that
248// match the Matcher filter. It returns the Selection of removed nodes.

Callers 1

TestRemoveFilteredFunction · 0.80

Calls 2

RemoveMatcherMethod · 0.95
compileMatcherFunction · 0.85

Tested by 1

TestRemoveFilteredFunction · 0.64