Selection.collapse()

Availability

BlackBerry Device Software version 4.7.1 or later

The collapse() method collapses a selection onto a single point.

Syntax

Selection.collapse( parentNode, offset )

Parameters

Parameter

Type

Description

parentNode

Node

Specifies the node into which the selection is collapsed.

offset

int

Specifies the offset to which the selection is collapsed. Valid values may be one of the following:

0: Collapses the selection from the anchor onto the start point of parentNode .

1: Collapses the selection from the anchor onto the end point of parentNode .

Return values

None.

Exceptions

None.

Last modified: 2013-08-14