FilterSelection reduces the set of matched elements to those that match a node in the specified Selection object. It returns a new Selection object for this subset of elements.
(sel *Selection)
| 55 | // node in the specified Selection object. |
| 56 | // It returns a new Selection object for this subset of elements. |
| 57 | func (s *Selection) FilterSelection(sel *Selection) *Selection { |
| 58 | if sel == nil { |
| 59 | return pushStack(s, winnowNodes(s, nil, true)) |
| 60 | } |
| 61 | return pushStack(s, winnowNodes(s, sel.Nodes, true)) |
| 62 | } |
| 63 | |
| 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. |