tor-browser

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

inserthorizontalrule-with-selecting-text-in-document-element.html (484B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <script>
      6 document.addEventListener("DOMContentLoaded", () => {
      7  const text = document.createTextNode("abc");
      8  document.documentElement.appendChild(text);
      9  const range = new Range();
     10  range.selectNodeContents(text);
     11  document.documentElement.contentEditable = "true";
     12  document.execCommand("insertUnorderedList");
     13  getSelection().addRange(range);
     14  document.execCommand("insertHorizontalRule");
     15 });
     16 </script>
     17 </head>
     18 </html>