Sha256: e794fc126c6c2dd429238a022a0db1596ed7e19701e79883ff2a755bcb473d7e
Contents?: true
Size: 971 Bytes
Versions: 19
Compression:
Stored size: 971 Bytes
Contents
(function() { var i, lastTime, len, vendor, vendors; lastTime = 0; vendors = ['webkit', 'moz']; for (i = 0, len = vendors.length; i < len; i++) { vendor = vendors[i]; if (!(!window.requestAnimationFrame)) { continue; } window.requestAnimationFrame = window[vendor + "RequestAnimationFrame"]; window.cancelAnimationFrame = window[vendor + "CancelAnimationFrame"] || window[vendor + "CancelRequestAnimationFrame"]; } if (!window.requestAnimationFrame) { window.requestAnimationFrame = function(callback, element) { var currTime, id, timeToCall; currTime = Date.now(); timeToCall = Math.max(0, 16 - (currTime - lastTime)); id = setTimeout(function() { return callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; } if (!window.cancelAnimationFrame) { window.cancelAnimationFrame = window.clearTimeout; } }).call(this);
Version data entries
19 entries across 19 versions & 1 rubygems