remove Document.Root, Document is itself a Selection (using embedded struct)

This commit is contained in:
Martin Angers
2012-10-14 12:28:27 -04:00
parent cbddb7a808
commit 6669ef001f
20 changed files with 339 additions and 339 deletions

View File

@@ -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