public
Last active

  • Download Gist
gistfile1.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Patch for jQuery 1.3.2 that makes animations work correctly when
working with different window contexts in Adobe AIR (1.5).
 
It causes the interval to be set on the window that belongs to
the element the animation is performed on.
===
 
@@ -4049,8 +4049,9 @@ jQuery.fx.prototype = {
t.elem = this.elem;
+ window = this.elem.ownerDocument.defaultView;
if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval(function(){
+ timerId = window.setInterval(function(){
var timers = jQuery.timers;
for ( var i = 0; i < timers.length; i++ )
@@ -4058,7 +4059,7 @@ jQuery.fx.prototype = {
timers.splice(i--, 1);
if ( !timers.length ) {
- clearInterval( timerId );
+ window.clearInterval( timerId );
timerId = undefined;
}
}, 13);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.