tor-browser

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

bug989012-2-ref.html (707B)


      1 <html class="reftest-wait">
      2  <head>
      3    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      4    <script src="/tests/SimpleTest/EventUtils.js"></script>
      5    <style>
      6      span:before {
      7        content: "IMAGE";
      8      }
      9    </style>
     10  </head>
     11  <body onload="start()">
     12    <div onfocus="done()" contenteditable>foo<span></span>bar</div>
     13    <script>
     14      var div = document.querySelector("div");
     15      function start() {
     16        div.focus();
     17      }
     18      function done() {
     19        var sel = getSelection();
     20        // Set the caret right before "bar"
     21        sel.collapse(div.lastChild, 0);
     22        document.documentElement.removeAttribute("class");
     23      }
     24    </script>
     25  </body>
     26 </html>