mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
50bc0db905
Differential Revision: https://phabricator.services.mozilla.com/D105355
17 lines
449 B
HTML
17 lines
449 B
HTML
<!DOCTYPE HTML>
|
|
<script>
|
|
var bc = new BroadcastChannel("navigate");
|
|
window.onload = () => {
|
|
bc.onmessage = (event) => {
|
|
if (event.data.command == "navigate") {
|
|
window.location = event.data.location;
|
|
bc.close();
|
|
}
|
|
if (event.data.command == "back") {
|
|
history.back();
|
|
bc.close();
|
|
}
|
|
}
|
|
bc.postMessage({command: "loaded", scrollRestoration: history.scrollRestoration});
|
|
}
|
|
</script> |