web api instance property
Selection: focusOffset property
The Selection.focusOffset read-only property returns the
number of characters that the selection’s focus is offset within the
focusNode if said node is of type Text, CDATASection or Comment.
In the case of focusNode being another type of node, Selection.focusOffset returns the number of childNodes the selection’s focus is offset within the focusNode.
This number is zero-based. If the selection ends with the first character in the
focusNode, 0 is returned.
Value
A number.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
Selection, the interface it belongs to.