Javascript [Electronic resources] : The Definitive Guide (4th Edition)

David Flanagan

نسخه متنی -صفحه : 844/ 737
نمايش فراداده

Availability

DOM Level 2 Range

Synopsis

void selectNodeContents(Node refNode) throws RangeException, DOMException;

Arguments

refNode

The node whose children are to become the contents of this range.

Throws

A RangeException with a code of INVALID_NODE_TYPE_ERR if refNode or one of its ancestors is a DocumentType, Entity, or Notation node.

A DOMException with a code of WRONG_DOCUMENT_ERR if refNode is part of a different document than the one through which this range was created.

Description

This method sets the boundary points of this range so that the range contains the children of refNode.

See Also

Range.selectNode( )