fencedframe-mark-signedin.html (676B)
1 <!DOCTYPE html> 2 <title>A page that uses fencedframe to set the login status to signed in</title> 3 4 <fencedframe></fencedframe> 5 <script> 6 // If this page was opened as a popup, notify the opener when we are done loading. 7 if (window.opener) { 8 window.onload = function() { 9 window.opener.postMessage("done_loading", "*"); 10 }; 11 } 12 13 // This code is intentionally after the onload listener registration 14 // because it can throw if FencedFrameConfig is not defined. In that 15 // case, we still want to notify the opener to avoid a test timeout. 16 const url = new URL("mark_signedin", location.href); 17 document.querySelector("fencedframe").config = new FencedFrameConfig(url); 18 19 </script>