<!DOCTYPE html> | |
<script> | |
window.portalHost.postMessage("loaded"); | |
var ph = window.portalHost; | |
window.onportalactivate = e => { | |
var exception_name = "" | |
try { | |
ph.postMessage("message"); | |
} | |
catch (error) { | |
exception_name = error.name; | |
} | |
bc = new BroadcastChannel("portal-host-post-message-after-activate"); | |
bc.postMessage(exception_name, "*"); | |
bc.close(); | |
}; | |
</script> |