summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/service-workers/service-worker/resources/iframe-with-fetch-variants.html
blob: 3a61d7bb890b4267c48553a8f7cf35f86f7c203e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<meta charset="utf-8" />
<script>
    const url = new URL(new URLSearchParams(location.search.substr(1)).get('url'), location.href);
    const before = performance.now();
    fetch(url)
        .then(r => r.text())
        .then(() =>
            parent.postMessage({
                before,
                after: performance.now(),
                entry: performance.getEntriesByName(url)[0].toJSON()
            }));
</script>