compiled-event-handler-settings-objects-support.html (461B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>This will be in an iframe</title> 4 5 <script> 6 window.name = "iframe"; 7 </script> 8 9 <body onbeforeunload="return { toString: parent.postMessage.bind(parent, 'PASS', '*') };"> 10 11 <!-- window.open() uses the entry settings object to determine how the URL will be parsed --> 12 <button onclick="var w = window.open('open-window.html'); w.onload = () => { parent.onWindowLoaded(w.document.URL); };">This will be clicked</button>