summaryrefslogtreecommitdiffstats
path: root/dom/base/crashtests/766426.html
blob: 53b48ac9e171d0f8cdb648fcd5e63d69b7de1d3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<head>
<script>

function boom()
{
    var j = 0;
    var a = document.getElementById("a");
    var r = document.createRange();
    r.setStart(a.childNodes[0], 0);
    r.setEnd(a.childNodes[1], 0);

    function f()
    {
        if (++j >= 2) {
            document.removeEventListener("DOMNodeRemoved", f, false);
        }
        r.extractContents();
    }

    document.addEventListener("DOMNodeRemoved", f, false);

    r.extractContents();
}

</script>
</head>
<body onload="boom();">
<div id="a"><span><span></span></span>X</div>
</body>
</html>