blob: 5955e2d7593a51fa112fe82bb97b79add54f3ba0 [file] [log] [blame]
<!doctype html>
<meta charset=utf-8>
<script>
const channelName = new URL(location).searchParams.get("channel");
const bc = new BroadcastChannel(channelName);
// Handle the close message from the test-cleanup, forwarding it to the
// top level document, as this iframe and the opening document might not
// be able to close the popup.
bc.onmessage = event => {
if (event.data == "close") {
top.postMessage("close", "*");
}
};
window.addEventListener("message", event => {
bc.postMessage(event.data);
});
</script>