dynamic-add-paragraph-after-summary-close.html 674 B

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