Name

Range.setStart( ): set the start point of a range — DOM Level 2 Range

Synopsis

void setStart(NoderefNode,
              long offset)
    throws RangeException, DOMException;

Arguments

refNode

The node that contains the new start point.

offset

The position of the new start point within refNode.

Throws

This method throws the same exceptions, for the same reasons, as Range.setEnd( ). See that reference page for details.

Description

This method sets the start point of this range by specifying the values of the startContainer and startOffset properties.

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.