tor-browser

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

selection-modify-line-next-to-input-and-make-it-invisible.html (547B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <script>
      6 document.addEventListener("DOMContentLoaded", () => {
      7  getSelection().addRange(document.createRange());
      8  const range = document.createRange();
      9  range.selectNode(document.querySelector("meter"));
     10  getSelection().addRange(range);
     11  getSelection().modify('move', 'left', 'line');
     12  document.querySelector("input").style.display = "none";
     13  getSelection().modify('move', 'left', 'lineboundary');
     14 })
     15 </script>
     16 </head>
     17 <body>
     18 <input>
     19 <div contenteditable>
     20 <meter>
     21 </div>
     22 </body>
     23 </html>