Programmer's Guide > Interfaces > W3C Range interface > collapse method
  
collapse method
Collapse a Range onto one of its boundary-points
collapse(toStart )
Parameters
booleantoStart
If TRUE, collapses the Range onto its start; if FALSE, collapses it onto its end.
Returns
void
Throws
DOMException
INVALID_STATE_ERR: Raised if detach() has already been invoked on this object.