]> git.proxmox.com Git - mirror_novnc.git/commitdiff
IE9 fixes. Works but slow. API change.
authorJoel Martin <jmartin@sentryds.com>
Mon, 31 Jan 2011 04:58:22 +0000 (22:58 -0600)
committerJoel Martin <jmartin@sentryds.com>
Mon, 31 Jan 2011 04:58:22 +0000 (22:58 -0600)
API change: changed include path variable from VNC_uri_prefix to
URI_INCLUDE since websock.js uses the variable and websock.js is no
longer just for noVNC (i.e. websockify is really the canonical
location for websock.js).

Changes to get web-socket-js to work. Right now it's a hack to get
around: https://github.com/gimite/web-socket-js/issues#issue/41. The
hack is to disable caching of the flash objects by appending
"?" + Math.random() to the end of the flash object path (but only when
using IE).

docs/TODO
include/ui.js
include/vnc.js
include/websock.js

index ec6216cf17f772795b9b007f4bb5571ac78f6836..bc6360ec84eb2c78bcfa42e02c9902b969bc7e86 100644 (file)
--- a/docs/TODO
+++ b/docs/TODO
@@ -3,7 +3,9 @@ Short Term:
 - Keyboard layout/internationalization support
     - convert keyCode into proper charCode
 
-- Test on IE 9 preview 3.
+- IE 9 improvements.
+    - https://github.com/gimite/web-socket-js/issues#issue/41
+    - try window.atob instead of decode for better performance
 
 - Status bar menu/buttons:
     - Explanatory hover text over buttons
index 217b8b152a1e2e379e7ccc4804aaec724aaf455d..2229c67d76adeee1660125e12e1bbf5bdd299cd5 100644 (file)
@@ -7,7 +7,7 @@
  */
 "use strict";
 /*jslint white: false */
-/*global $, Util, RFB, Canvas, VNC_uri_prefix, Element, Fx */
+/*global $, Util, RFB, Canvas, Element, Fx */
 
 var UI = {
 
index bee737d8ff6969aea372988af53d36620339b6a4..e06426574186240d1fb255dcc055c90d5ecaf6f1 100644 (file)
@@ -8,7 +8,7 @@
 
 "use strict";
 /*jslint evil: true */
-/*global window, document, VNC_uri_prefix */
+/*global window, document, INCLUDE_URI */
 
 // Globals defined here
 var VNC_native_ws, WEB_SOCKET_SWF_LOCATION;
@@ -16,14 +16,14 @@ var VNC_native_ws, WEB_SOCKET_SWF_LOCATION;
 /*
  * Load supporting scripts
  */
-function get_VNC_uri_prefix() {
-    return (typeof VNC_uri_prefix !== "undefined") ? VNC_uri_prefix : "include/";
+function get_INCLUDE_URI() {
+    return (typeof INCLUDE_URI !== "undefined") ? INCLUDE_URI : "include/";
 }
 
 (function () {
     var extra = "", start, end;
 
-    start = "<script src='" + get_VNC_uri_prefix();
+    start = "<script src='" + get_INCLUDE_URI();
     end = "'><\/script>";
 
     // Uncomment to activate firebug lite
index b9f52d734145e37bd0716b00b08394c10312dd31..5caf3df51140bf21f05ad222215f1e235ef9a5de 100644 (file)
@@ -32,7 +32,11 @@ if (window.WebSocket) {
             end = "'><\/script>", extra = "";
 
         WEB_SOCKET_SWF_LOCATION = get_INCLUDE_URI() +
-                    "web-socket-js/WebSocketMain.swf";
+                    "web-socket-js/WebSocketMain.swf?" + Math.random();
+        if (Util.Engine.trident) {
+            Util.Debug("Forcing uncached load of WebSocketMain.swf");
+            WEB_SOCKET_SWF_LOCATION += "?" + Math.random();
+        }
         extra += start + "web-socket-js/swfobject.js" + end;
         extra += start + "web-socket-js/FABridge.js" + end;
         extra += start + "web-socket-js/web_socket.js" + end;