summaryrefslogtreecommitdiffstats
path: root/dom/xul/crashtests/329982-1.xhtml
blob: 43f374a57edd8b63938d5e114a79727b9b8c473e (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
33
34
35
36
37
38
39
40
41
42
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<script>

function init()
{
  var A = document.getElementById("z");
  var B = A.nextSibling;
  var C = B.nextSibling;
  var P = A.parentNode;
  
  document.addEventListener("DOMNodeRemoved", fizzy, false);
  P.removeChild(B);
  document.removeEventListener("DOMNodeRemoved", fizzy, false);
  
  function fizzy()
  {
    document.removeEventListener("DOMNodeRemoved", fizzy, false); // avoid recursion
    P.removeChild(A);
  }
    
  document.documentElement.appendChild(C);
}


window.addEventListener("load", init, false);

</script>

</head>

<body>

<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<menupopup y="x">
  <menuitem id="z"/>
  <menuitem/>
  <menuitem/>
</menupopup>

</hbox>

</body>
</html>