summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/portals/resources/portal-host-hidden-after-activation-portal.html
blob: 491d184f9720d249e55f470e7032c82f555620c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<script>
  window.addEventListener("portalactivate", function(e) {
    var bc = new BroadcastChannel("portals-host-hidden-after-activation");
    bc.postMessage({ hasHost: !!window.portalHost });
    bc.close();
  });

  var bc = new BroadcastChannel("portals-host-hidden-after-activation");
  bc.postMessage({hasHost: !!window.portalHost });
  bc.close();

  window.portalHost.postMessage("loaded");
</script>