file_xslt_outer.html (408B)
1 <iframe allow="microphone https://example.org" id="ifr"></iframe> 2 <script> 3 window.addEventListener("message", ({ data }) => { opener.postMessage(data, "*") }); 4 5 const file = (new URLSearchParams(location.search)).get("file"); 6 const CROSS_ORIGIN = new URL(file, location.href); 7 CROSS_ORIGIN.hostname = "example.org"; 8 CROSS_ORIGIN.port = null; 9 document.getElementById("ifr").src = CROSS_ORIGIN.href; 10 </script>