blob: ffae9c6536662793528abd49af35a8ba31a35603 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<!DOCTYPE html>
<h1>file_broadcast_load.html</h1>
<script>
let channel = new BroadcastChannel("test");
channel.onmessage = function(e) {
console.log("file_broadcast_load.html got message:", e.data);
if (e.data == "close") {
window.close();
}
};
addEventListener("load", function() {
console.log("file_broadcast_load.html loaded");
channel.postMessage("load");
});
</script>
|