Get retrieves the underlying node at the specified index. Get without parameter is not implemented, since the node array is available on the Selection object.
(index int)
| 71 | // Get without parameter is not implemented, since the node array is available |
| 72 | // on the Selection object. |
| 73 | func (s *Selection) Get(index int) *html.Node { |
| 74 | if index < 0 { |
| 75 | index += len(s.Nodes) // Negative index gets from the end |
| 76 | } |
| 77 | return s.Nodes[index] |
| 78 | } |
| 79 | |
| 80 | // Index returns the position of the first element within the Selection object |
| 81 | // relative to its sibling elements. |
no outgoing calls