tor-browser

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

selectall-during-setting-innerHTML-of-documentElement.html (455B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <script>
      6 "use strict";
      7 
      8 addEventListener("DOMContentLoaded", () => {
      9  const script = document.querySelector("script");
     10  script.appendChild(
     11    document.createElement("iframe")
     12  );
     13  document.documentElement.innerHTML =
     14    `<body contenteditable><iframe onload="document.execCommand('selectAll')"></iframe>`;
     15 }, {once: true});
     16 </script>
     17 </head>
     18 <body>
     19  <div contenteditable></div>
     20 </body>
     21 </html>