summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html')
-rw-r--r--testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html b/testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html
new file mode 100644
index 0000000000..ff8bead324
--- /dev/null
+++ b/testing/web-platform/tests/portals/resources/portal-activate-inside-portal.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<body>
+ <script>
+ var portal = document.createElement("portal");
+ portal.src = "simple-portal.html";
+ portal.onload = () => {
+ portal.activate().catch(e => window.portalHost.postMessage(e.name));
+ }
+ document.body.appendChild(portal);
+ </script>
+</body>