multipleinsertionpoints-insertsingle-2.xhtml 906 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
  2. <head>
  3. <bindings xmlns="http://www.mozilla.org/xbl"
  4. xmlns:xhtml="http://www.w3.org/1999/xhtml">
  5. <binding id="a">
  6. <content>
  7. <xhtml:div>
  8. <children includes="span"/>
  9. </xhtml:div>
  10. <xhtml:div>
  11. <children/>
  12. </xhtml:div>
  13. </content>
  14. </binding>
  15. </bindings>
  16. <script>
  17. function boom()
  18. {
  19. document.body.offsetHeight;
  20. var afterelt = document.getElementById("after");
  21. var parent = afterelt.parentNode;
  22. var newelt = document.createElement("div");
  23. newelt.appendChild(document.createTextNode(4));
  24. parent.insertBefore(newelt, afterelt);
  25. document.body.offsetHeight;
  26. document.documentElement.className = "";
  27. }
  28. </script>
  29. </head>
  30. <body onload="boom();">
  31. <div style="-moz-binding: url(#a);">
  32. <div>3</div><span>1</span><span id="after">2</span><div>5</div>
  33. </div>
  34. </body>
  35. </html>