Commit 8fe2c2f9 authored by Joel Martin's avatar Joel Martin

Fix web-socket-js loading issue.

parent 97763d0e
...@@ -93,7 +93,7 @@ fill. For example: ...@@ -93,7 +93,7 @@ fill. For example:
<div id='vnc'>Loading</div> <div id='vnc'>Loading</div>
</body> </body>
<script src='vnc.js'></script> <script src='vnc.js'></script>
<script> windows.onload = RFB.load('vnc'); </script> <script> windows.onload = function () { RFB.load('vnc'); }</script>
The file `include/plain.css` has a list of stylable elements. The file `include/plain.css` has a list of stylable elements.
...@@ -302,10 +302,12 @@ ...@@ -302,10 +302,12 @@
console.error(decodeURIComponent(message)); console.error(decodeURIComponent(message));
} }
/*
if (window.addEventListener) { if (window.addEventListener) {
window.addEventListener("load", WebSocket.__initialize, false); window.addEventListener("load", WebSocket.__initialize, false);
} else { } else {
window.attachEvent("onload", WebSocket.__initialize); window.attachEvent("onload", WebSocket.__initialize);
} }
*/
})(); })();
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<script src="vnc.js"></script> <script src="vnc.js"></script>
<script> <script>
window.onload = RFB.load('vnc'); window.onload = function () { RFB.load('vnc'); }
</script> </script>
</html> </html>
...@@ -1247,6 +1247,7 @@ load: function (target) { ...@@ -1247,6 +1247,7 @@ load: function (target) {
"'file://' URL is incompatible with Adobe Flash"); "'file://' URL is incompatible with Adobe Flash");
} else { } else {
WebSocket.__swfLocation = "include/web-socket-js/WebSocketMain.swf"; WebSocket.__swfLocation = "include/web-socket-js/WebSocketMain.swf";
WebSocket.__initialize();
RFB.use_seq = true; RFB.use_seq = true;
RFB.updateState('disconnected', 'Disconnected'); RFB.updateState('disconnected', 'Disconnected');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment