mirror of
https://github.com/PuerkitoBio/goquery
synced 2025-10-06 09:17:05 +08:00
remove Document.Root, Document is itself a Selection (using embedded struct)
This commit is contained in:
2
array.go
2
array.go
@@ -63,7 +63,7 @@ func (this *Selection) Index() int {
|
||||
// not found.
|
||||
func (this *Selection) IndexSelector(selector string) int {
|
||||
if len(this.Nodes) > 0 {
|
||||
sel := this.document.Root.Find(selector)
|
||||
sel := this.document.Find(selector)
|
||||
return indexInSlice(sel.Nodes, this.Nodes[0])
|
||||
}
|
||||
return -1
|
||||
|
Reference in New Issue
Block a user