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({
384384 // The request was aborted, clear the interval and decrement jQuery.active
385385 if ( ! xhr || xhr . readyState === 0 ) {
386386 requestDone = true ;
387- xhr . onreadystatechange = function ( ) { } ;
387+ xhr . onreadystatechange = jQuery . noop ;
388388
389389 // Handle the global AJAX counter
390390 if ( s . global && ! -- jQuery . active ) {
@@ -394,7 +394,7 @@ jQuery.extend({
394394 // The transfer is complete and the data is available, or the request timed out
395395 } else if ( ! requestDone && xhr && ( xhr . readyState === 4 || isTimeout === "timeout" ) ) {
396396 requestDone = true ;
397- xhr . onreadystatechange = function ( ) { } ;
397+ xhr . onreadystatechange = jQuery . noop ;
398398
399399 status = isTimeout === "timeout" ?
400400 "timeout" :
Original file line number Diff line number Diff line change @@ -464,6 +464,8 @@ jQuery.extend({
464464 return true ;
465465 } ,
466466
467+ noop : function ( ) { } ,
468+
467469 // Evalulates a script in a global context
468470 globalEval : function ( data ) {
469471 if ( data && rnotwhite . test ( data ) ) {
Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ jQuery.event = {
427427 ready : {
428428 // Make sure the ready event is setup
429429 setup : jQuery . bindReady ,
430- teardown : function ( ) { }
430+ teardown : jQuery . noop
431431 } ,
432432
433433 live : {
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ jQuery.offset = {
121121
122122 body . removeChild ( container ) ;
123123 body = container = innerDiv = checkDiv = table = td = null ;
124- jQuery . offset . initialize = function ( ) { } ;
124+ jQuery . offset . initialize = jQuery . noop ;
125125 } ,
126126
127127 bodyOffset : function ( body ) {
You can’t perform that action at this time.
0 commit comments