embed-navigation-is-not-intercepted-iframe.html (709B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>iframe for embed-and-object-are-not-intercepted test</title> 4 <body> 5 <script> 6 // The EMBED element will call this with the result about whether the EMBED 7 // request was intercepted by the service worker. 8 var report_result; 9 10 // Our parent (the root frame of the test) will examine this to get the result. 11 var test_promise = new Promise(resolve => { 12 report_result = resolve; 13 }); 14 15 let el = document.createElement('embed'); 16 el.src = "/common/blank.html"; 17 el.addEventListener('load', _ => { 18 window[0].location = "/service-workers/service-worker/resources/embedded-content-from-server.html"; 19 }, { once: true }); 20 document.body.appendChild(el); 21 </script> 22 23 </body>