summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fenced-frame/resources/prerender-inner.html
blob: a523ef31c1a3423c3c11b607c7f497209e10054f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<script src="utils.js"></script>
<title>Fenced frame content to report the result of prerendering</title>

<body>
<script>
(() => {
  [prerender_ready_key, prerender_loaded_key, prerender_activated_key] =
      parseKeylist();
  document.addEventListener('prerenderingchange', () => {
    writeValueToServer(prerender_activated_key, 'activated');
  });
  if (document.prerendering) {
    writeValueToServer(prerender_ready_key, 'ready');
  } else {
    writeValueToServer(prerender_loaded_key, 'loaded');
  }
})();
</script>
</body>