5 var B
= document
.getElementById("span-B");
6 B
.customProperty
= "B";
7 B
.nextSibling
.customProperty
= "D";
9 document
.getElementById("div").innerHTML
= "<span>replacement content</span>";
11 // create lots of objects to force a garbage collection
19 var output
= document
.getElementById("output");
21 output
.innerHTML
+= B
.customProperty
+ "<BR>";
23 output
.innerHTML
+= B
.nextSibling
.customProperty
+ "<BR>";
27 if (window
.testRunner
) {
28 testRunner
.dumpAsText();
34 <body onload=
"doit()">
35 <div style=
"border: 1px solid red">
37 This test verifies that DOM nodes are retained because a wrapper exists and is protected for a sibling. A wrapper need not exist for the node itself or for an ancestor.
40 The output should be the following pieces of text on lines by themselves:
"replacement content",
"B",
"D".
44 <span id=
"span-A"><span id=
"span-B"><span id=
"span-C">original span
</span></span>
45 <span id=
"span-D"> xx
</span>