I already wondered the same thing. I'm pretty sure that Google really loves closure. Of course, there is not a single variable, this is a "safe" thing.
As far as I can tell, this is the same, without any changes to interference with namespaces (a common reason to use a similar closure):
window.requestAnimFrame =
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback){
window.setTimeout(callback, 1000 / 60);
};
source
share