tor-browser

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

selection-modify-line-boundary-around-empty-details.html (627B)


      1 <!doctype html>
      2 <html class="test-wait">
      3 <head>
      4 <meta charset="utf-8">
      5 <script>
      6 "use strict";
      7 
      8 addEventListener("load", () => {
      9  let i = 0;
     10  const details = document.querySelector("details");
     11  const id = setInterval(() => {
     12    getSelection().modify("move", "forward", "lineboundary");
     13    if (details.isConnected) {
     14      details.outerHTML = undefined;
     15    }
     16    if (++i == 5) {
     17      document.documentElement.removeAttribute("class");
     18      clearInterval(id);
     19    }
     20  }, 0);
     21  document.execCommand("selectAll");
     22 }, {once: true});
     23 </script>
     24 </head>
     25 <body>
     26 <details>a</details>
     27 <span contenteditable></span>
     28 </body>
     29 </html>