summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3.html
blob: e3b8d61a9a372242e2e937b288bb606d381a14ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<p>Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred.</p>

<p id="a"><a name="anchor">paragraph a</a></p>
<script>
if (window.layoutTestController)
    layoutTestController.dumpAsText();

var list = document.getElementsByName("anchor");
var x = list.length
x = list[0];

// Remove the child node of paragraph A. Use innerHTML to avoid getting a reference to the node being removed.
document.getElementById("a").innerHTML = "";

// Now try the original list.
x = list.length;
x = list[0];
</script>