tor-browser

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

dynamic-add-summary-and-paragraph.html (845B)


      1 <!DOCTYPE html>
      2 <!-- Any copyright is dedicated to the Public Domain.
      3   - http://creativecommons.org/publicdomain/zero/1.0/ -->
      4 
      5 <html class="reftest-wait">
      6  <script>
      7  function runTest() {
      8    // Append <summary> and <p> into <details>.
      9    var summary = document.createElement("summary");
     10    var summary_text = document.createTextNode("Summary");
     11    summary.appendChild(summary_text);
     12 
     13    var paragraph = document.createElement("p");
     14    var details_text = document.createTextNode("This is the details.");
     15    paragraph.appendChild(details_text);
     16 
     17    var details = document.getElementById("details");
     18    details.appendChild(summary);
     19    details.appendChild(paragraph);
     20 
     21    document.documentElement.removeAttribute("class");
     22  }
     23  </script>
     24  <body onload="runTest();">
     25    <details open id="details">
     26    </details>
     27  </body>
     28 </html>