1
0
Fork 0
firefox/docshell/test/mochitest/file_bug1121701_2.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

23 lines
665 B
HTML

<script>
var bc = new BroadcastChannel("file_bug1121701_2");
bc.onmessage = (msgEvent) => {
var msg = msgEvent.data;
var command = msg.command;
if (command == "setInnerHTML") {
window.document.body.innerHTML = "<img>";
window.onmessage = function() {
bc.postMessage({command: "onmessage"});
window.document.body.firstChild.src = msg.location;
bc.close();
};
window.onbeforeunload = function() {
window.postMessage("foo", "*");
};
history.back();
}
}
window.onpageshow = function(e) {
bc.postMessage({command: "child2PageShow", persisted: e.persisted});
};
</script>