TextRange.collapse() (Method)

A method that shrinks a text range to an insertion point.

Availability:

JScript - 3.0
Internet Explorer - 4.0
JavaScript syntax:IEmyTextRange.collapse()
IEmyTextRange.collapse(aFlag)
Argument list:aFlagA Boolean value to indicate which end of the text range should become the insertion point

You can call this method to shrink the TextRange to an insertion point either at the start or end of the text range.

If no value is passed as an argument, then the insertion point is taken from the start of the text range.

A Boolean true value also uses the startpoint as the new insertion point.

A Boolean value of false selects the endpoint as the new insertion point.