sandbox-inherited-from-initiator-response-helper.html (398B)
1 <script> 2 const iframe_1_script = encodeURI(` 3 <script> 4 try { 5 document.domain = document.domain; 6 parent.postMessage("not sandboxed", "*"); 7 } catch (exception) { 8 parent.postMessage("sandboxed", "*"); 9 } 10 </scr`+`ipt> 11 `); 12 13 const iframe_1 = parent.document.querySelector("#iframe_1"); 14 iframe_1.src = `data:text/html,${iframe_1_script}`; 15 </script>