1566310.html (516B)
1 <!doctype html> 2 <html> 3 <head> 4 <script type="text/javascript"> 5 function noop() {} 6 function crash() { 7 let div = document.querySelector("div"); 8 let ifr = document.querySelector("iframe"); 9 10 // We need a reference to the iframe's window from *before* it gets detached. 11 let win = ifr.contentWindow; 12 13 div.appendChild(ifr); 14 15 win.addEventListener("beforeunload", noop); 16 win.removeEventListener("beforeunload", noop); 17 } 18 </script> 19 </head> 20 <body onload="crash()"> 21 <div></div> 22 <iframe></iframe> 23 </body> 24 </html>