summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/speculation-rules/prerender/resources/prompt-by-before-unload-inner-frame.html
blob: ba59ca79604d9448b90234d429e9abf1625814a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<script src="/speculation-rules/prerender/resources/utils.js"></script>
<script>
const params = new URLSearchParams(location.search);
const uid = params.get('uid');

window.onload = function(e) {
  const bc = new PrerenderChannel('inner-channel', uid);
  bc.postMessage('a new page is loaded');
  bc.close();
}
</script>