Skip to content

Commit

Permalink
Remove extra word (#32870)
Browse files Browse the repository at this point in the history
Remove "spends" and several grammar fixes. 
Fix #32860
  • Loading branch information
dawei-wang committed Mar 28, 2024
1 parent 1081182 commit 1057131
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions files/en-us/web/api/document/evaluate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ evaluate(xpathExpression, contextNode, namespaceResolver, resultType, result)
- : A result set containing all the nodes matching the expression. The nodes
in the result set are not necessarily in the same order they appear in
the document.
> **Note:** Results this type contain references to nodes in the document.
> **Note:** Results of this type contain references to nodes in the document.
> Modifying a node will invalidate the iterator.
> After modifying a node, attempting to iterate through the results will result in an error.
- `ORDERED_NODE_ITERATOR_TYPE` (`5`)
- : A result set containing all the nodes matching the expression. The nodes
in the result set are in the same order they appear in the document.
> **Note:** Results this type contain references to nodes in the document.
> **Note:** Results of this type contain references to nodes in the document.
> Modifying a node will invalidate the iterator.
> After modifying a node, attempting to iterate through the results will result in an error.
- `UNORDERED_NODE_SNAPSHOT_TYPE` (`6`)
Expand Down Expand Up @@ -115,9 +115,9 @@ alert(alertText); // Alerts the text of all h2 elements
```

Note, in the above example, a more verbose _xpath_ is preferred over common shortcuts
such as `//h2`. Generally, more specific _xpath_ selectors as in the above
example usually gives a significant performance improvement, especially on very large
documents. This is because the evaluation of the query spends does not waste time
such as `//h2`. Generally, more specific _xpath_ selectors, as in the above
example, usually give a significant performance improvement, especially on very large
documents. This is because the evaluation of the query does not waste time
visiting unnecessary nodes. Using // is generally slow as it visits _every_
node from the root and all subnodes looking for possible matches.

Expand Down

0 comments on commit 1057131

Please sign in to comment.