TOC PREV NEXT INDEX

domref



compareBoundaryPoints


Compares the boundary points of two Ranges.

Syntax

compare = range.compareBoundaryPoints(how,sourceRange);
 

Parameters

The compareBoundaryPoints method takes the following parameters:

compare
 

A number, 1, 0, -1.

how
 

A constant describing the comparison method

sourceRange
 

A Range to boundary points with range


Example

range = document.createRange();
 
range.selectNode(
  document.getElementsByTagName("div").item(0));
 
sourceRange = document.createRange();
 
sourceRange.selectNode(document.getElementsByTagName(
  "div").item(1));
 
compare = range.compareBoundaryPoints(
  START_TO_END,sourceRange);
 

Notes

END_TO_END compares the end boundary-point of sourceRange to the end boundary-point of range.

END_TO_START compares the end boundary-point of sourceRange to the start boundary-point of range.

START_TO_END compares the start boundary-point of sourceRange to the end boundary-point of range.

START_TO_START compares the start boundary-point of sourceRange to the start boundary-point of range.

Specification

compareBoundaryPoints


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX