| B = document.getElementById("span-B"); |
| document.getElementById("div").innerHTML = "<span>replacement content</span>"; |
| // create lots of objects to force a garbage collection |
| var output= document.getElementById("output"); |
| output.innerHTML += B.customProperty + "<BR>"; |
| output.innerHTML += "parent node exists<BR>"; |
| output.innerHTML += "child node exists<BR>"; |
| <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". |
| <span id="span-A"><span id="span-B"><span id="span-C">original span</span></span></span> |