layout/reftests/dom/insertsingle.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <html class="reftest-wait">
michael@0 2 <head>
michael@0 3
michael@0 4 <script>
michael@0 5 function boom()
michael@0 6 {
michael@0 7 document.body.offsetHeight;
michael@0 8
michael@0 9 var fourdiv = document.getElementById("four");
michael@0 10 var parent = fourdiv.parentNode;
michael@0 11
michael@0 12 var newdiv = document.createElement("div");
michael@0 13 newdiv.appendChild(document.createTextNode("3"));
michael@0 14 parent.insertBefore(newdiv, fourdiv);
michael@0 15
michael@0 16 document.body.offsetHeight;
michael@0 17 document.documentElement.className = "";
michael@0 18 }
michael@0 19 </script>
michael@0 20
michael@0 21 </head>
michael@0 22 <body onload="boom();">
michael@0 23 <div>1</div>
michael@0 24 <div>2</div>
michael@0 25 <div id="four">4</div>
michael@0 26 <div>5</div>
michael@0 27 </body>
michael@0 28 </html>

mercurial