diff options
author | Solly <directxman12+github@gmail.com> | 2014-09-19 12:35:27 -0400 |
---|---|---|
committer | Solly <directxman12+github@gmail.com> | 2014-09-19 12:35:27 -0400 |
commit | e4e9a9b97fec107b25573b29d2e72a6abf8f0a46 (patch) | |
tree | 1b24a41748a1e1f97a3b61487c88ec6852efac34 | |
parent | 2c9623b5a73e5ab9b54d462596d1fef0063c9a73 (diff) | |
parent | 77bd04f8338b5ccaf78e2f8e3df0400ad9908ca9 (diff) | |
download | novnc-e4e9a9b97fec107b25573b29d2e72a6abf8f0a46.tar.gz |
Merge pull request #391 from mandre/fix_invalid_property
Fix invalid updateState property on RFB preventing noVNC to load
-rw-r--r-- | include/util.js | 4 | ||||
-rw-r--r-- | tests/vnc_perf.html | 2 | ||||
-rw-r--r-- | tests/vnc_playback.html | 2 | ||||
-rw-r--r-- | vnc_auto.html | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/include/util.js b/include/util.js index c145d5a..a6045da 100644 --- a/include/util.js +++ b/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]]); diff --git a/tests/vnc_perf.html b/tests/vnc_perf.html index 18aba35..c439e95 100644 --- a/tests/vnc_perf.html +++ b/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> diff --git a/tests/vnc_playback.html b/tests/vnc_playback.html index 9d7f31f..b5faf93 100644 --- a/tests/vnc_playback.html +++ b/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> diff --git a/vnc_auto.html b/vnc_auto.html index 53b8220..ff376fe 100644 --- a/vnc_auto.html +++ b/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); |