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 frameDoc
= frame
.contentDocument
;
29 spanB
= frame
.contentDocument
.getElementById("span-B");
30 spanB
.customProperty
= "B";
31 frame
.onload
= frameLoaded
;
32 frame
.src
= 'about:blank'
35 if (window
.testRunner
) {
36 testRunner
.waitUntilDone();
37 testRunner
.dumpAsText();
43 <body onload=
"doit()">
44 <div style=
"border: 1px solid red">
46 This test verifies that objects are protected against garbage
47 collection as long as the document is alive (for contrast with test
51 The output should be the following pieces of text on lines by
52 themselves:
"B",
"[object HTMLElement]",
"[object HTMLElement]",
"[object HTMLDocument]".
59 <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>'
>