Skip to content

Commit 285f532

Browse files
committed
Cleaned code.
1 parent 4e5be40 commit 285f532

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

utils/requestAnimationFrame.js

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@
44
*/
55

66
if ( !window.requestAnimationFrame ) {
7-
8-
window.requestAnimationFrame = ( function() {
9-
10-
return window.webkitRequestAnimationFrame ||
11-
window.mozRequestAnimationFrame || // comment out if FF4 is slow (it caps framerate at ~30fps: https://bugzilla.mozilla.org/show_bug.cgi?id=630127)
12-
window.oRequestAnimationFrame ||
13-
window.msRequestAnimationFrame ||
14-
function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {
15-
16-
window.setTimeout( callback, 1000 / 60 );
17-
18-
};
19-
20-
} )();
21-
22-
}
7+
window.requestAnimationFrame = ( function() {
8+
return window.webkitRequestAnimationFrame ||
9+
window.mozRequestAnimationFrame || // comment out if FF4 is slow (it caps framerate at ~30fps: https://bugzilla.mozilla.org/show_bug.cgi?id=630127)
10+
window.oRequestAnimationFrame ||
11+
window.msRequestAnimationFrame ||
12+
function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {
13+
window.setTimeout( callback, 1000 / 60 );
14+
};
15+
} )();
16+
}

0 commit comments

Comments
 (0)