5 document
.getElementById("span-B").customProperty
= "B";
7 // create lots of objects to force a garbage collection
15 var output
= document
.getElementById("output");
17 output
.innerHTML
+= document
.getElementById("span-B").customProperty
+ "<BR>";
20 if (window
.testRunner
) {
21 testRunner
.dumpAsText();
27 <body onload=
"doit()">
28 <div style=
"border: 1px solid red">
30 This test verifies that JavaScript wrappers for DOM nodes are
31 protected against garbage collection as long as the node remains in
32 the document (so custom properties are preserved).
35 The output should be the following pieces of text on lines by themselves:
"original span",
"B":
39 <span id=
"span-A"><span id=
"span-B"><span id=
"span-C">original span
</span></span></span>