tor-browser

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

textarea-splittext-with-range-crash.html (576B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <script>
      6 addEventListener("load", () => {
      7  const textarea = document.querySelector("textarea");
      8  const ul = document.createElement('ul');
      9 
     10  const textNodeInTextarea = document.createTextNode("");
     11  textarea.appendChild(textNodeInTextarea);
     12  document.documentElement.getBoundingClientRect();
     13 
     14  textarea.appendChild(ul);
     15  const range = document.createRange();
     16  range.selectNode(ul);
     17 
     18  textNodeInTextarea.data = "ab";
     19  textNodeInTextarea.splitText(1);
     20 });
     21 </script>
     22 </head>
     23 <body><textarea></textarea></body>
     24 </html>