compareBoundaryPoints method

Compares two ranges by comparing their boundary points.

Document Object Model (DOM) Level 2 Traversal and Range Specification, Section 2.13Internet Explorer 9

Syntax

var retval = Range.compareBoundaryPoints(how, sourceRange);

Parameters

how [in]

Type: short

Specifies how sourceRange is compared to the range of the object on which compareBoundaryPoints is invoked.

START_TO_START

Compares the start boundary point of both ranges.

START_TO_END

Compares the start boundary point of sourceRange with the end boundary point of the other range.

END_TO_END

Compares the end boundary points of both ranges.

END_TO_START

Compares the end boundary point of sourceRange to the start boundary point of the other range.

sourceRange [in]

Type: object

Range object  that is compared to the range of the object on which compareBoundaryPoints is invoked.

Return value

Type: Integer

Returns a –1, 0, or 1 to indicate whether the sourceRange point is before, equal to, or after the boundary point of the Range object on which compareBoundaryPoints is invoked.

Standards information

See also

Range

 

 

Show:
© 2014 Microsoft