blob: 9789fa95663baacfe3eb2038c6341beddfbf8b30 [file] [log] [blame]
function doit()
B = document.getElementById("span-B");
B.customProperty = "B";
document.getElementById("div").innerHTML = "<span>replacement content</span>";
var output= document.getElementById("output");
output.innerHTML += B.customProperty + "<BR>";
if (B.parentNode) {
output.innerHTML += "parent node exists<BR>";
if (B.firstChild) {
output.innerHTML += "child node exists<BR>";
if (window.testRunner) {
<body onload="doit()">
<div style="border: 1px solid red">
This test verifies that DOM nodes are retained because a wrapper exists for a descendant. A wrapper need not exist for the node itself or for an ancestor.
The output should be the following pieces of text on lines by themselves: "replacement content", "B", "parent node exists", "child node exists".
<div id="div">
<span id="span-A"><span id="span-B"><span id="span-C">original span</span></span></span>
<div id="output">