Selection.collapseToStart()

  • Revision slug: DOM/Selection/collapseToStart
  • Revision title: collapseToStart
  • Revision id: 347863
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

{{DomRef}}

Summary

Collapses the selection to the start of the first range in the selection.  If the content the selection is in is focused and editable, the caret will blink there.

Syntax

sel.collapseToStart()

Parameters

None.

See also

  • {{domxref("Selection")}}

Revision Source

<div>{{DomRef}}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p>Collapses the selection to the start of the first range in the selection.&nbsp; If the content the selection is in is focused and editable, the caret will blink there.</p>

<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox">
<var>sel</var>.collapseToStart()
</pre>

<h3 id="Parameters" name="Parameters">Parameters</h3>
<p>None.</p>

<h2 id="See_also">See also</h2>
<ul>
  <li>{{domxref("Selection")}}</li>
</ul>
Revert to this revision