From bbbdd947256a3fcd788fb9d4f306046082a1ef1f Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski Date: Tue, 27 Aug 2013 00:54:13 +0200 Subject: Fix #10814. Make support tests lazy and broken out to components. --- src/ajax/xhr.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ajax') diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index fdc5b08d3..e08cfcac3 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -1,8 +1,8 @@ define([ "../core", - "../ajax", - "../support" -], function( jQuery ) { + "../var/support", + "../ajax" +], function( jQuery, support ) { jQuery.ajaxSettings.xhr = function() { try { @@ -33,13 +33,13 @@ if ( window.ActiveXObject ) { }); } -jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -jQuery.support.ajax = xhrSupported = !!xhrSupported; +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; jQuery.ajaxTransport(function( options ) { var callback; // Cross domain only allowed if supported through XMLHttpRequest - if ( jQuery.support.cors || xhrSupported && !options.crossDomain ) { + if ( support.cors || xhrSupported && !options.crossDomain ) { return { send: function( headers, complete ) { var i, id, -- cgit v1.2.3