prerender-response-code.html (657B)
1 <head> 2 <script src="/common/utils.js"></script> 3 <script src="./utils.js"></script> 4 <script> 5 const search = new URLSearchParams(location.search); 6 const uid = search.get('uid'); 7 const uid1 = token(); 8 const uid2 = token(); 9 const bc = new BroadcastChannel(uid); 10 11 window.onload = async () => { 12 bc.addEventListener('message', ({data}) => { 13 if (data === 'close') 14 window.close(); 15 else if (data === 'activate') 16 location.href = url; 17 }) 18 19 startPrerendering(`/speculation-rules/prerender/resources/dual-exec.html?uid1=${uid1}&uid2=${uid2}`); 20 }; 21 </script> 22 </head>