1
0
mirror of https://github.com/fcwu/docker-ubuntu-vnc-desktop synced 2026-08-05 16:12:41 +02:00

fix: popup UI.rfb not found

This commit is contained in:
Doro Wu
2018-03-28 00:13:21 +08:00
parent 12b6fe995c
commit 761933bd7f
+9 -2
View File
@@ -334,16 +334,23 @@
</audio>
<script type="module">
import UI from './novnc/app/ui.js';
var f = function () {
if (!UI.rfb) {
setTimeout(f, 1000);
} else {
UI.rfb.addEventListener('connect', function(event) {
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connected'}), '*');
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connectedd'}), '*');
UI.rfb._display.defaultCursor();
// console.log(UI.connected)
// console.log(event);
});
UI.rfb.addEventListener('disconnect', function(event) {
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconnected'}), '*');
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconneccted'}), '*');
});
// console.log(UI.rfb._rfb_connection_state);
}
};
f();
</script>
</body>
</html>