TextRange.compareEndPoints() (Method)

Compare two TextRange objects.

Availability:

JScript - 3.0
Internet Explorer - 4.0
JavaScript syntax:IEmyTextRange.compareEndPoints(anOperator, aTextRange)
Argument list:anOperatorA selector for the kind of comparison
aTextRangeA reference to another TextRange object

The typical means of comparing two objects is to pass a reference to one object as an argument to a method invoked on the other. This method performs such a comparison. The first keyword is an operator to indicate the kind of comparison to be carried out. The second argument is a reference to the second TextRange object that it is to be compared with.

The following keywords can be passed in the first argument as string values:

The values returned by this method are -1, 0 or 1. These indicate whether the first value is before, coincident with or after the second value. The operator dictates which values are to be tested.

See also:TextRange.isEqual(), TextRange.setEndPoint()