tor-browser

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

bug989012-1.html (752B)


      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  </head>
      6  <body onload="start()">
      7    <div onfocus="setTimeout(done, 0)" contenteditable>foo<img alt="IMAGE">bar</div>
      8    <script>
      9      var div = document.querySelector("div");
     10      function start() {
     11        div.focus();
     12      }
     13      function done() {
     14        var sel = getSelection();
     15        sel.collapse(div, 0);
     16        // Press Right four times to set the caret right before "bar"
     17        for (var i = 0; i < 4; ++i) {
     18          synthesizeKey("KEY_ArrowRight");
     19        }
     20        document.documentElement.removeAttribute("class");
     21      }
     22    </script>
     23  </body>
     24 </html>