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:
StartToEnd
StartToStart
EndToStart
EndToEnd
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() |
Prev | Home | Next |
TextRange.collapse() | Up | TextRange.duplicate() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |