Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove requestAnimationFrame support. Fixes #9381.

  • Loading branch information...
commit 2053d1c621e8ef65b79d6b339d7336c732ed1b82 1 parent 0b8b636
@timmywil timmywil authored
Showing with 3 additions and 20 deletions.
  1. +3 −20 src/effects.js
View
23 src/effects.js
@@ -13,10 +13,7 @@ var elemdisplay = {},
// opacity animations
[ "opacity" ]
],
- fxNow,
- requestAnimationFrame = window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame;
+ fxNow;
jQuery.fn.extend({
show: function( speed, easing, callback ) {
@@ -392,8 +389,7 @@ jQuery.fx.prototype = {
// Start an animation from one number to another
custom: function( from, to, unit ) {
var self = this,
- fx = jQuery.fx,
- raf;
+ fx = jQuery.fx;
this.startTime = fxNow || createFxNow();
this.start = from;
@@ -409,20 +405,7 @@ jQuery.fx.prototype = {
t.elem = this.elem;
if ( t() && jQuery.timers.push(t) && !timerId ) {
- // Use requestAnimationFrame instead of setInterval if available
- if ( requestAnimationFrame ) {
- timerId = true;
- raf = function() {
- // When timerId gets set to null at any point, this stops
- if ( timerId ) {
- requestAnimationFrame( raf );
- fx.tick();
- }
- };
- requestAnimationFrame( raf );
- } else {
- timerId = setInterval( fx.tick, fx.interval );
- }
+ timerId = setInterval( fx.tick, fx.interval );
}
},
Please sign in to comment.
Something went wrong with that request. Please try again.