Remove removes the set of matched elements from the document. It returns the same selection, now consisting of nodes not in the document.
()
| 225 | // Remove removes the set of matched elements from the document. |
| 226 | // It returns the same selection, now consisting of nodes not in the document. |
| 227 | func (s *Selection) Remove() *Selection { |
| 228 | for _, n := range s.Nodes { |
| 229 | if n.Parent != nil { |
| 230 | n.Parent.RemoveChild(n) |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | return s |
| 235 | } |
| 236 | |
| 237 | // RemoveFiltered removes from the current set of matched elements those that |
| 238 | // match the selector filter. It returns the Selection of removed nodes. |
no outgoing calls