MCPcopy Create free account
hub / github.com/components/jquery / ajaxExtend

Function ajaxExtend

jquery.js:8029–8043  ·  view source on GitHub ↗
( target, src )

Source from the content-addressed store, hash-verified

8027// that takes "flat" options (not to be deep extended)
8028// Fixes trac-9887
8029function ajaxExtend( target, src ) {
8030 var key, deep,
8031 flatOptions = jQuery.ajaxSettings.flatOptions || {};
8032
8033 for ( key in src ) {
8034 if ( src[ key ] !== undefined ) {
8035 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
8036 }
8037 }
8038 if ( deep ) {
8039 jQuery.extend( true, target, deep );
8040 }
8041
8042 return target;
8043}
8044
8045/* Handles responses to an ajax request:
8046 * - finds the right dataType (mediates between content-type and expected dataType)

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected