File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ jQuery.extend({
384
384
// The request was aborted, clear the interval and decrement jQuery.active
385
385
if ( ! xhr || xhr . readyState === 0 ) {
386
386
requestDone = true ;
387
- xhr . onreadystatechange = function ( ) { } ;
387
+ xhr . onreadystatechange = jQuery . noop ;
388
388
389
389
// Handle the global AJAX counter
390
390
if ( s . global && ! -- jQuery . active ) {
@@ -394,7 +394,7 @@ jQuery.extend({
394
394
// The transfer is complete and the data is available, or the request timed out
395
395
} else if ( ! requestDone && xhr && ( xhr . readyState === 4 || isTimeout === "timeout" ) ) {
396
396
requestDone = true ;
397
- xhr . onreadystatechange = function ( ) { } ;
397
+ xhr . onreadystatechange = jQuery . noop ;
398
398
399
399
status = isTimeout === "timeout" ?
400
400
"timeout" :
Original file line number Diff line number Diff line change @@ -464,6 +464,8 @@ jQuery.extend({
464
464
return true ;
465
465
} ,
466
466
467
+ noop : function ( ) { } ,
468
+
467
469
// Evalulates a script in a global context
468
470
globalEval : function ( data ) {
469
471
if ( data && rnotwhite . test ( data ) ) {
Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ jQuery.event = {
427
427
ready : {
428
428
// Make sure the ready event is setup
429
429
setup : jQuery . bindReady ,
430
- teardown : function ( ) { }
430
+ teardown : jQuery . noop
431
431
} ,
432
432
433
433
live : {
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ jQuery.offset = {
121
121
122
122
body . removeChild ( container ) ;
123
123
body = container = innerDiv = checkDiv = table = td = null ;
124
- jQuery . offset . initialize = function ( ) { } ;
124
+ jQuery . offset . initialize = jQuery . noop ;
125
125
} ,
126
126
127
127
bodyOffset : function ( body ) {
You can’t perform that action at this time.
0 commit comments