This method has a single argument. The argument indicates what to look for when expanding the TextRange object. The end point is modified according to the rules determined by this keyword. The following keywords can be applied:
character
word
sentence
textedit
The character keyword causes the endpoint to be indexed onwards by a single character position.
The word keyword looks for the next word break in the document text. It also moves the start point to he beginning of the word.
The sentence keyword looks for the next full stop at the end of a sentence. It also looks onwards from this to move the start point to the beginning of the sentence.
The textedit keyword restores the TextRange so it encapsulates only the original selection.
This method returns a Boolean true if the range expansion succeeded and a Boolean false if it didn't.
See also: | TextRange.move() |
Prev | Home | Next |
TextRange.execCommand() | Up | TextRange.findText() |
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. |