Skip to content

Commit

Permalink
vnc: added message forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
afdaniele committed Sep 24, 2020
1 parent a8320dd commit a51e2f8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions assets/vnc/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,16 @@
<body>
<div id="app"></div>
<!-- built files will be auto injected -->

<!-- message forwarding to parent -->
<script type="application/javascript">
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connecting'}), '*');

window.addEventListener("message", (event) => {
if (window !== window.parent){
window.parent.postMessage(event.data, '*');
}
}, false);
</script>
</body>
</html>

0 comments on commit a51e2f8

Please sign in to comment.