Replace references to window
with root
This commit is contained in:
parent
a1d7eb6f18
commit
43cae6cf02
16
springy.js
16
springy.js
|
@ -464,14 +464,14 @@
|
|||
|
||||
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; // stolen from coffeescript, thanks jashkenas! ;-)
|
||||
|
||||
Springy.requestAnimationFrame = __bind(window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
function(callback, element) {
|
||||
window.setTimeout(callback, 10);
|
||||
}, window);
|
||||
Springy.requestAnimationFrame = __bind(root.requestAnimationFrame ||
|
||||
root.webkitRequestAnimationFrame ||
|
||||
root.mozRequestAnimationFrame ||
|
||||
root.oRequestAnimationFrame ||
|
||||
root.msRequestAnimationFrame ||
|
||||
(function(callback, element) {
|
||||
root.setTimeout(callback, 10);
|
||||
}), root);
|
||||
|
||||
|
||||
// start simulation
|
||||
|
|
Loading…
Reference in New Issue
Block a user