MCPcopy
hub / github.com/jquery/jquery / callIfDefined

Function callIfDefined

test/data/testinit.js:204–215  ·  view source on GitHub ↗
( deferType, optionType )

Source from the content-addressed store, hash-verified

202 requests = jQuery.map( requestOptions, function( options ) {
203 var request = ( options.create || jQuery.ajax )( options ),
204 callIfDefined = function( deferType, optionType ) {
205 var handler = options[ deferType ] || !!options[ optionType ];
206 return function( _, status ) {
207 if ( !completed ) {
208 if ( !handler ) {
209 assert.ok( false, "unexpected " + status );
210 } else if ( typeof handler === "function" ) {
211 handler.apply( this, arguments );
212 }
213 }
214 };
215 };
216
217 if ( options.afterSend ) {
218 options.afterSend( request, assert );

Callers 1

testinit.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected