summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-base-url-iframe.html
blob: 504e10435642330fbeb2334855bb9d3966276469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
<head>
<title>iframe for css base url test</title>
</head>
<body>
<script>
// Load a stylesheet. Create it dynamically so we can construct the href URL
// dynamically.
const link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
// Add "request-url-path" to the path to help distinguish the request URL from
// the response URL. Add |document.location.search| (chosen by the test main
// page) to tell the service worker how to respond to the request.
link.href = 'request-url-path/fetch-request-css-base-url-style.css' +
    document.location.search;
document.head.appendChild(link);
</script>
</body>
</html>