summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html
blob: 1112ca28ece225799367b53b9a9c30fc4071abeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE HTML>
<html>

<head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  <title>Page to be Prefetched</title>
  <script src="/common/dispatcher/dispatcher.js"></script>
</head>

<body>
  <script>
    const pageshowPromise = new Promise(resolve => {
      window.addEventListener('pageshow', resolve, { once: true });
    });

    async function getTransferSize() {
      await pageshowPromise;
      return window.performance.getEntriesByType('navigation')[0].transferSize;
    }
    const params = new URLSearchParams(window.location.search);
    const uuid = params.get("uuid");
    const executor = new Executor(uuid);
  </script>

</body>

</html>