tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

selection-modify-around-textarea.html (484B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <script>
      6 "use strict";
      7 document.addEventListener("DOMContentLoaded", () => {
      8  const time = document.querySelector("time");
      9  getSelection().setBaseAndExtent(time, 2, time, 3);
     10  getSelection().modify("move", "left", "line");
     11  getSelection().collapseToStart();
     12 });
     13 </script>
     14 </head>
     15 <body><time style="user-select:none">
     16 <h5>
     17 <pre contenteditable></pre>
     18 <textarea></textarea>
     19 </h5>
     20 <h6></h6>
     21 <textarea></textarea>
     22 </body>
     23 </html>