6 // create lots of objects to force a garbage collection
14 var output
= document
.getElementById("output");
16 output
.innerHTML
+= spanB
.customProperty
+ "<BR>";
17 output
.innerHTML
+= spanB
+ "<BR>";
18 output
.innerHTML
+= spanB
.parentNode
+ "<BR>";
19 output
.innerHTML
+= spanB
.ownerDocument
+ "<BR>";
21 if (window
.testRunner
)
22 testRunner
.notifyDone();
27 var frame
= document
.getElementById("frame");
28 spanB
= frame
.contentDocument
.getElementById("span-B");
29 spanB
.customProperty
= "B";
30 frame
.onload
= frameLoaded
;
31 frame
.src
= "about:blank";
34 if (window
.testRunner
) {
35 testRunner
.dumpAsText();
36 testRunner
.waitUntilDone();
42 <body onload=
"doit()">
43 <div style=
"border: 1px solid red">
45 This test verifies that DOM documents are protected against garbage
46 collection but without necessarily keeping all their children alive,
47 so long as any node in the document is reachable.
50 The output should be the following pieces of text on lines by
51 themselves:
"B",
"[object HTMLElement]",
"null",
"[object HTMLDocument]".
58 <iframe id=
"frame" src='data:text/html,
<div id=
"div"><span id=
"span-A"><span id=
"span-B"><span id=
"span-C">original span
</span></span></span></div>'
>