blob: f0cb1c2d52213622ede636711d9804487dfc4daa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<html>
<head>
<script>
window.onpageshow = function() {
let bc = new BroadcastChannel("test_reload");
bc.onmessage = function(event) {
if (event.data == "reload") {
bc.close();
location.reload(true);
} else if (event.data == "close") {
bc.postMessage("closed");
bc.close();
window.close();
}
}
bc.postMessage("pageshow");
}
</script>
</head>
<body>
</body>
</html>
|