multipleinsertionpoints-insertmultiple.xhtml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 lastdiv = document.getElementById("last");
  21. var parent = lastdiv.parentNode;
  22. var newelt = document.createElement("span");
  23. newelt.appendChild(document.createTextNode(1));
  24. parent.insertBefore(newelt, lastdiv);
  25. newelt = document.createElement("div");
  26. newelt.appendChild(document.createTextNode(4));
  27. parent.insertBefore(newelt, lastdiv);
  28. newelt = document.createElement("span");
  29. newelt.appendChild(document.createTextNode(2));
  30. parent.insertBefore(newelt, lastdiv);
  31. document.body.offsetHeight;
  32. document.documentElement.className = "";
  33. }
  34. </script>
  35. </head>
  36. <body onload="boom();">
  37. <div style="-moz-binding: url(#a);">
  38. <div>3</div><div id="last">5</div>
  39. </div>
  40. </body>
  41. </html>