Selection.focusNode

  • Revision slug: DOM/Selection/focusNode
  • Revision title: focusNode
  • Revision id: 185361
  • Created:
  • Creator: DR
  • Is current revision? No
  • Comment

Revision Content

{{ DomRef() }}

Summary

Returns the node in which the selection ends.

Syntax

sel.focusNode

Notes

A user may make a selection from left to right (in document order) or right to left (reverse of document order). The focus is where the user ended the selection. This can be visualized by holding the Shift key and pressing the arrow keys on your keyboard to modify the current selection. The selection's focus moves, but the selection's anchor, the other end of the selection, does not move.

{{ languages( { "es": "es/DOM/Selection/focusNode", "it": "it/DOM/Selection/focusNode", "pl": "pl/DOM/Selection/focusNode" } ) }}

Revision Source

<p>
{{ DomRef() }}
</p>
<h3 id="Summary" name="Summary"> Summary </h3>
<p>Returns the node in which the selection ends.
</p>
<h3 id="Syntax" name="Syntax"> Syntax </h3>
<pre class="eval"><i>sel</i>.focusNode
</pre>
<h3 id="Notes" name="Notes"> Notes </h3>
<p>A user may make a selection from left to right (in document order) or right to left (reverse of document order). The focus is where the user ended the selection. This can be visualized by holding the Shift key and pressing the arrow keys on your keyboard to modify the current selection. The selection's focus moves, but the selection's anchor, the other end of the selection, does not move.
</p>
<div class="noinclude">
</div>
{{ languages( { "es": "es/DOM/Selection/focusNode", "it": "it/DOM/Selection/focusNode", "pl": "pl/DOM/Selection/focusNode" } ) }}
Revert to this revision