tor-browser

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

remove-all-children-of-documentElement-in-designMode-when-no-body.html (383B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <script>
      6 document.addEventListener("DOMContentLoaded", () => {
      7  document.designMode = "on";
      8  document.documentElement.innerText = "abc def\n"; // causes removing the implicit <body> element
      9  let child;
     10  while ((child = document.documentElement.lastChild)) {
     11    child.remove();
     12  }
     13 }, {once: true});
     14 </script>
     15 </head>
     16 </html>