From 2b4f616d96f92dc6596f8f4836582048dd57a3a5 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Sun, 19 Aug 2012 15:34:40 +0200 Subject: Update noVNC webclient. --- webclients/novnc/include/util.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'webclients/novnc/include/util.js') 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 () {}; -- cgit v1.2.1