PrependNodes prepends the specified nodes to each node in the set of matched elements. This follows the same rules as Selection.Append.
(ns ...*html.Node)
| 215 | // |
| 216 | // This follows the same rules as Selection.Append. |
| 217 | func (s *Selection) PrependNodes(ns ...*html.Node) *Selection { |
| 218 | return s.manipulateNodes(ns, true, func(sn *html.Node, n *html.Node) { |
| 219 | // sn.FirstChild may be nil, in which case this functions like |
| 220 | // sn.AppendChild() |
| 221 | sn.InsertBefore(n, sn.FirstChild) |
| 222 | }) |
| 223 | } |
| 224 | |
| 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. |
no test coverage detected