Bug Tracker

Changeset 5570

Show
Ignore:
Timestamp:
05/12/08 19:45:02 (7 months ago)
Author:
aflesler
Message:

jquery fx & event: replaced the use of .apply(), where .call() could had been used.

Location:
trunk/jquery/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/event.js

    r5499 r5570  
    496496                // Execute all of them 
    497497                jQuery.each( jQuery.readyList, function(){ 
    498                     this.apply( document ); 
     498                    this.call( document ); 
    499499                }); 
    500500                 
  • trunk/jquery/src/fx.js

    r5378 r5570  
    8282            for ( p in prop ) { 
    8383                if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) 
    84                     return jQuery.isFunction(opt.complete) && opt.complete.apply(this); 
     84                    return jQuery.isFunction(opt.complete) && opt.complete.call(this); 
    8585 
    8686                if ( p == "height" || p == "width" ) { 
     
    149149             
    150150                if ( queue(this, type).length == 1 ) 
    151                     fn.apply(this); 
     151                    fn.call(this); 
    152152            } 
    153153        }); 
     
    203203 
    204204        if ( q.length ) 
    205             q[0].apply( this ); 
     205            q[0].call( this ); 
    206206    }); 
    207207}; 
     
    227227                jQuery(this).dequeue(); 
    228228            if ( jQuery.isFunction( opt.old ) ) 
    229                 opt.old.apply( this ); 
     229                opt.old.call( this ); 
    230230        }; 
    231231     
     
    261261    update: function(){ 
    262262        if ( this.options.step ) 
    263             this.options.step.apply( this.elem, [ this.now, this ] ); 
     263            this.options.step.call( this.elem, this.now, this ); 
    264264 
    265265        (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); 
     
    382382            if ( done && jQuery.isFunction( this.options.complete ) ) 
    383383                // Execute the complete function 
    384                 this.options.complete.apply( this.elem ); 
     384                this.options.complete.call( this.elem ); 
    385385 
    386386            return false;