setStart method

void setStart(
  1. Node node,
  2. int offset
)

The Range.setStart() method sets the start position of a Range.

If the startNode is a Node of type Text, Comment, or CDataSection, then startOffset is the number of characters from the start of startNode. For other Node types, startOffset is the number of child nodes between the start of the startNode.

Setting the start point below (lower in the document) the end point will result in a collapsed range with the start and end points both set to the specified start position.

Implementation

external void setStart(
  Node node,
  int offset,
);