HTMLTextAreaElement: selectionDirection property - Web APIs | MDN
Value
A string; "forward", "backward", or "none".
Examples
js
const textarea = document.getElementById("text-box");
const end = textarea.selectionDirection;
Specifications
| Specification |
|---|
| HTML # dom-textarea/input-selectiondirection |
Browser compatibility
See also
<textarea>HTMLTextAreaElementHTMLTextAreaElement.selectionStartHTMLTextAreaElement.selectionEndHTMLTextAreaElement.textLengthHTMLTextAreaElement.select()HTMLTextAreaElement.setSelectionRange()HTMLTextAreaElement.setRangeText()HTMLInputElement.selectionDirectionSelection::selectionpseudo-element