JavaScript: The Definitive Guide

25.334. XPathResult.snapshotItem( ): return a node that matches an XPath query

25.334.1. Synopsis

Node snapshotItem(index)

25.334.1.1. Arguments

index

The index of the node to be returned.

25.334.1.2. Returns

The node at the specified index, or null if the index is less than zero or greater than or equal to snapshotLength.

25.334.1.3. Throws

This method throws an exception if resultType is not UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE.

Категории