3 if (window
.testRunner
) testRunner
.dumpAsText();
4 var node
= document
.createElement("div");
5 document
.getElementById("replace").parentNode
.replaceChild(node
, document
.getElementById("replace"));
6 document
.getElementById("result").appendChild(document
.createTextNode(node
.parentNode
));
10 <p>This tests for a bug in replaceChild where it would fail to replace an element if it was the first child of its container.
11 See
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=6782">bug
6782</a> for details.
12 If the test is successful you will see an object description below, and if it fails you will see
"null".
</p>
13 <div><div id=
"replace"></div></div>
14 <div id=
"result"></div></body>