XML DOM selectNodeContents() method
Definition and usage
The selectNodeContents() method sets the boundary of the range to the child node of a node.
Syntax:
selectNodeContents(refNode)
Parameter
Parameter | Description |
---|---|
refNode | Its child nodes will become the nodes that contain the current range content. |
throw
If refNode or one of its ancestor nodes is a DocumentType, Entity, or Notation node, this method will throw a code of INVALID_NODE_TYPE_ERR RangeException exception.
If refNode The document it belongs to is different from the document that created the range, and this method will throw a code of WRONG_DOCUMENT_ERR DOMException exception.
Description
This method sets the boundary point of the range to include refNode subnodes.