blob: 4a0704f9e4be8cac1133bb1823a27a2ebba2ff86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<title>Window for cross-origin iframe with Shared Worker</title>
<script src="/common/get-host-info.sub.js"></script>
<body>
<script>
const iframe_url = new URL(
'iframe-sw-shared-name.html',
get_host_info().ORIGIN + self.location.pathname);
window.onmessage = (e) => {window.opener.postMessage(e.data, '*')};
var frame = document.createElement('iframe');
frame.src = iframe_url;
frame.style.position = 'absolute';
document.body.appendChild(frame);
</script>
</body>
</html>
|