Section 25.241. Range.setEnd( ): set the end point of a range


25.241. Range.setEnd( ): set the end point of a range

DOM Level 2 Range

25.241.1. Synopsis

 void setEnd(Node refNode,             long offset)     throws RangeException, DOMException; 

25.241.1.1. Arguments

refNode

The node that contains the new end point.


offset

The position of the end point within refNode.

25.241.1.2. Throws

A RangeException with a code of INVALID_NODE_TYPE_ERR if refNode or one of its ancestors is a DocumentType 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, or a code of INDEX_SIZE_ERR if offset is negative or is greater than the number of children or characters in refNode.

25.241.2. Description

This method sets the end point of a range by specifying the values of the endContainer and endOffset properties.




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net