IndexMatcher returns the position of the first element within the Selection object relative to the elements matched by the matcher, or -1 if not found.
(m Matcher)
| 101 | // Selection object relative to the elements matched by the matcher, or -1 if |
| 102 | // not found. |
| 103 | func (s *Selection) IndexMatcher(m Matcher) int { |
| 104 | if len(s.Nodes) > 0 { |
| 105 | sel := s.document.FindMatcher(m) |
| 106 | return indexInSlice(sel.Nodes, s.Nodes[0]) |
| 107 | } |
| 108 | return -1 |
| 109 | } |
| 110 | |
| 111 | // IndexOfNode returns the position of the specified node within the Selection |
| 112 | // object, or -1 if not found. |
nothing calls this directly
no test coverage detected