<!DOCTYPE html>
<body>
  <script>
    var portal = document.createElement("portal");
    portal.src = "simple-portal.html"
    portal.onload = () => {
      portal.activate();
      portal.activate().catch(e => window.opener.postMessage(e.name, "*"));
    }
    document.body.append(portal);
  </script>
</body>
