PageSourceSearch

https://www.bertrand-berge.com/wp-content/themes/sublime/js/polyfill.requestAnimationFrame.js?ver=7.1.3

js bertrand-berge.com collected 2026-10-07 21:53:17 UTC 1,107 bytes, 26 lines download raw bytes

vendor: 1,107 bytes, lines 1-26
1// requestAnimationFrame polyfill thanks to Paul Irish -> http://paulirish.com/2011/requestanimationframe-for-smart-animating/
2// And Erik Möller -> http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
3(function() {
4	var lastTime = 0;
5	var vendors = ['ms', 'moz', 'webkit', 'o'];
6	for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
7	    window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
8	    window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] 
9							 || window[vendors[x]+'CancelRequestAnimationFrame'];
10	}
11
12	if (!window.requestAnimationFrame)
13	    window.requestAnimationFrame = function(callback, element) {
14		   var currTime = new Date().getTime();
15		   var timeToCall = Math.max(0, 16 - (currTime - lastTime));
16		   var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 
17			timeToCall);
18		   lastTime = currTime + timeToCall;
19		   return id;
20	    };
21
22	if (!window.cancelAnimationFrame)
23	    window.cancelAnimationFrame = function(id) {
24		   clearTimeout(id);
25	    };
26}());

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.