Browse Source

Merge pull request #391 from mandre/fix_invalid_property

Fix invalid updateState property on RFB preventing noVNC to load
Solly 11 years ago
parent
commit
e4e9a9b97f
4 changed files with 7 additions and 3 deletions
  1. 4 0
      include/util.js
  2. 1 1
      tests/vnc_perf.html
  3. 1 1
      tests/vnc_playback.html
  4. 1 1
      vnc_auto.html

+ 4 - 0
include/util.js

@@ -341,6 +341,10 @@ Util.set_defaults = function (obj, conf, defaults) {
 
     for (i = 0; i < keys.length; i++) {
         var setter = obj['_raw_set_' + keys[i]];
+        if (!setter) {
+          Util.Warn('Invalid property ' + keys[i]);
+          continue;
+        }
 
         if (conf[keys[i]]) {
             setter.call(obj, conf[keys[i]]);

+ 1 - 1
tests/vnc_perf.html

@@ -202,7 +202,7 @@
                 dbgmsg("  " + enc + ": " + VNC_frame_data_multi[enc].length);
             }
             rfb = new RFB({'target': $D('VNC_canvas'),
-                           'updateState': updateState});
+                           'onUpdateState': updateState});
             rfb.testMode(send_array, VNC_frame_encoding);
         }
     </script>

+ 1 - 1
tests/vnc_playback.html

@@ -131,7 +131,7 @@
             if (fname) {
                 message("VNC_frame_data.length: " + VNC_frame_data.length);
                 rfb = new RFB({'target': $D('VNC_canvas'),
-                               'updateState': updateState});
+                               'onUpdateState': updateState});
             }
         }
     </script>

+ 1 - 1
vnc_auto.html

@@ -198,7 +198,7 @@
                            'local_cursor': WebUtil.getQueryVar('cursor', true),
                            'shared':       WebUtil.getQueryVar('shared', true),
                            'view_only':    WebUtil.getQueryVar('view_only', false),
-                           'updateState':  updateState,
+                           'onUpdateState':  updateState,
                            'onXvpInit':    xvpInit,
                            'onPasswordRequired':  passwordRequired});
             rfb.connect(host, port, password, path);