xbl-children-4.xhtml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml"
  3. xmlns:xbl="http://www.mozilla.org/xbl"
  4. class="reftest-wait">
  5. <head>
  6. <meta charset="UTF-8" />
  7. <style>
  8. children { display:block; }
  9. </style>
  10. </head>
  11. <body>
  12. <xbl:children />
  13. <script>
  14. onload = function() {
  15. /* First, schedule a pending restyle of the whole tree. */
  16. var newSheet = document.createElementNS("http://www.w3.org/1999/xhtml", "style");
  17. newSheet.appendChild(document.createTextNode("#nosuchelement { }"));
  18. document.head.appendChild(newSheet);
  19. /* Now, append a frame to our children element, causing the pending restyle to descend into it. */
  20. var children = document.getElementsByTagName("xbl:children")[0];
  21. var span = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
  22. span.appendChild(document.createTextNode("PASS"));
  23. children.appendChild(span);
  24. document.documentElement.removeAttribute("class");
  25. }
  26. </script>
  27. </body>
  28. </html>