Sets the start position of the current Range to the start position of the specified node.

Note: The Range object and its setStartBefore method are supported in Internet Explorer from version 9.

The start position of a Range is the first position in the DOM hierarchy that is contained by the Range.
If you want the current Range to start after the specified node, use the setStartBefore method.
To set the start position to a point that is not the start or end point of any node, use the setStart method.

Syntax:

Parameters:

node

Required. The start position of the current Range will be aligned to the start position of the element referenced by the node parameter.

Return value:

This method has no return value.

The setStartBefore (node) method is equivalent to the setStart (parentNode, index) method,
where the parentNode parameter refers to the parent node of the element specified by the node parameter and the
value of the index parameter is the position of the element referenced by the node parameter in the childNodes
collection of the element referenced by the parentNode parameter.