summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw.https.html
blob: 069a50eae9a90bce2f8fb1022fed5bd72b5a5d17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE HTML>
<meta charset=utf-8>

<body>
  <script>
    new PerformanceObserver(entries => {
        window.parent.postMessage(entries.getEntries()[0].toJSON());
    }).observe({ entryTypes: ["largest-contentful-paint"] });

    const image = document.createElement("img");
    image.src = "/images/green.svg";
    image.id = "theImage";
    document.body.appendChild(image);
  </script>
</body>