diff options
author | Christian Beier <dontmind@freeshell.org> | 2012-08-19 15:34:40 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2012-08-19 15:34:40 +0200 |
commit | 2b4f616d96f92dc6596f8f4836582048dd57a3a5 (patch) | |
tree | aeaac6647bb0320de605e40905702066144ce786 /webclients/novnc/include/util.js | |
parent | 2fba1be4536511696a266fb504c60167d3015038 (diff) | |
download | libtdevnc-2b4f616d96f92dc6596f8f4836582048dd57a3a5.tar.gz libtdevnc-2b4f616d96f92dc6596f8f4836582048dd57a3a5.zip |
Update noVNC webclient.
Diffstat (limited to 'webclients/novnc/include/util.js')
-rw-r--r-- | webclients/novnc/include/util.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/webclients/novnc/include/util.js b/webclients/novnc/include/util.js index ddc1914..57ccb54 100644 --- a/webclients/novnc/include/util.js +++ b/webclients/novnc/include/util.js @@ -1,6 +1,6 @@ /* * noVNC: HTML5 VNC client - * Copyright (C) 2011 Joel Martin + * Copyright (C) 2012 Joel Martin * Licensed under LGPL-3 (see LICENSE.txt) * * See README.md for usage and integration instructions. @@ -57,6 +57,21 @@ if (!Array.prototype.map) }; } +// +// requestAnimationFrame shim with setTimeout fallback +// + +window.requestAnimFrame = (function(){ + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function(callback){ + window.setTimeout(callback, 1000 / 60); + }; +})(); + /* * ------------------------------------------------------ * Namespaced in Util @@ -131,6 +146,8 @@ Util.conf_default = function(cfg, api, defaults, v, mode, type, defval, desc) { } } else if (type in {'integer':1, 'int':1}) { val = parseInt(val, 10); + } else if (type === 'str') { + val = String(val); } else if (type === 'func') { if (!val) { val = function () {}; |