summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/speculation-rules/prerender/resources/prerender-while-prerender-inner.html
blob: 60b6c64dedc12b014db1925fe3f853a916943fb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<meta charset="utf-8">
<title>Prerender while prerendering test: inner maybe-prerendered page</title>

<script>
"use strict";
window.onFirstScriptExecutedPrerendering = document.prerendering;
</script>

<script src="utils.js"></script>

<script type="module">
const params = new URLSearchParams(location.search);
const uid = params.get("uid");

const channel = new PrerenderChannel("result", uid);
channel.postMessage(window.onFirstScriptExecutedPrerendering);
channel.close();
</script>