329982-1.xhtml (790B)
1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <head> 3 4 <script> 5 6 function init() 7 { 8 var A = document.getElementById("z"); 9 var B = A.nextSibling; 10 var C = B.nextSibling; 11 var P = A.parentNode; 12 13 document.addEventListener("DOMNodeRemoved", fizzy, false); 14 P.removeChild(B); 15 document.removeEventListener("DOMNodeRemoved", fizzy, false); 16 17 function fizzy() 18 { 19 document.removeEventListener("DOMNodeRemoved", fizzy, false); // avoid recursion 20 P.removeChild(A); 21 } 22 23 document.documentElement.appendChild(C); 24 } 25 26 27 window.addEventListener("load", init, false); 28 29 </script> 30 31 </head> 32 33 <body> 34 35 <hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 36 37 <menupopup y="x"> <menuitem id="z"/> <menuitem/> <menuitem/></menupopup> 38 39 </hbox> 40 41 </body> 42 </html>