summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/resources/nav-cancelation-2-helper.html
blob: a0b4acda2ea17322b85d1e46c2675de374be8889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<meta charset="utf-8">
<title>Page with child frame that navigates slowly</title>

<!--
  This file is used by `../nav-cancelation-2.sub.html`. The iframe below is its
  grandchild iframe, and whenever its load event fires we report this up to our
  parent Document.
-->
<iframe src="slow.py"></iframe>

<script>
  window.parent.postMessage("grandchild frame created", "*");
  const iframe = document.querySelector('iframe');
  iframe.onload = e => {
    window.parent.postMessage("grandchild frame loaded", "*");
  };
</script>