fix: popup UI.rfb not found
This commit is contained in:
parent
12b6fe995c
commit
761933bd7f
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue