tor-browser

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

update-dom-during-undoing-in-textarea.html (622B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Test for updating the DOM tree while execCommand("undo") is running in the textarea</title>
      6 <script>
      7 "use strict";
      8 
      9 let count = 0;
     10 addEventListener("load", () => {
     11  document.execCommand("insertText", false, "F");
     12  document.execCommand("undo");
     13 });
     14 
     15 function onInputOfTextarea() {
     16  if (count) {
     17    document.querySelector("base").appendChild(
     18      document.querySelector("content")
     19    );
     20  }
     21  count++;
     22 }
     23 </script>
     24 </head>
     25 <body>
     26 <iframe></iframe>
     27 <textarea autofocus oninput="onInputOfTextarea()">a</textarea>
     28 <base></base>
     29 <content>
     30 <menu>
     31 </body>
     32 </html>