1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32

content / test / data / accessibility / html / textarea-with-selection.html [blame]

<!--
@MAC-ALLOW:AXRoleDescription
@WIN-ALLOW:caret_offset*
@WIN-ALLOW:ia2_hypertext=*
@WIN-ALLOW:IA2_STATE*
@WIN-ALLOW:n_selections*
@WIN-ALLOW:selection_start*
@WIN-ALLOW:selection_end*
@BLINK-ALLOW:textSel*
@AURALINUX-ALLOW:text-input-type*
@AURALINUX-ALLOW:editable
@AURALINUX-ALLOW:focus*
@AURALINUX-ALLOW:*-line
@AURALINUX-ALLOW:caret_offset*
@AURALINUX-ALLOW:selection_start*
@AURALINUX-ALLOW:selection_end*
-->
<!DOCTYPE html>
<html>
<body>

<textarea rows="4" cols="50" autofocus style="font-family: monospace">
The textarea tag defines a multi-line text input control.
</textarea>

  <script>
    var textarea = document.querySelector('textarea');
    textarea.selectionStart = 0;
    textarea.selectionEnd = textarea.textLength;
  </script>
</body>
</html>