mirror of
https://github.com/jquery/jquery.git
synced 2026-02-10 02:35:02 -05:00
Build: update grunt-jscs-checker and pass with the new rules
This commit is contained in:
@@ -24,7 +24,9 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
||||
var callbackName, overwritten, responseContainer,
|
||||
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
||||
"url" :
|
||||
typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
|
||||
typeof s.data === "string" &&
|
||||
!( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
|
||||
rjsonp.test( s.data ) && "data"
|
||||
);
|
||||
|
||||
// Handle iff the expected data type is "jsonp" or we have a parameter to set
|
||||
|
||||
@@ -6,7 +6,8 @@ define([
|
||||
// Install script dataType
|
||||
jQuery.ajaxSetup({
|
||||
accepts: {
|
||||
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
|
||||
script: "text/javascript, application/javascript, " +
|
||||
"application/ecmascript, application/x-ecmascript"
|
||||
},
|
||||
contents: {
|
||||
script: /(?:java|ecma)script/
|
||||
|
||||
@@ -7,7 +7,7 @@ define([
|
||||
jQuery.ajaxSettings.xhr = function() {
|
||||
try {
|
||||
return new XMLHttpRequest();
|
||||
} catch( e ) {}
|
||||
} catch ( e ) {}
|
||||
};
|
||||
|
||||
var xhrId = 0,
|
||||
@@ -45,7 +45,13 @@ jQuery.ajaxTransport(function( options ) {
|
||||
xhr = options.xhr(),
|
||||
id = ++xhrId;
|
||||
|
||||
xhr.open( options.type, options.url, options.async, options.username, options.password );
|
||||
xhr.open(
|
||||
options.type,
|
||||
options.url,
|
||||
options.async,
|
||||
options.username,
|
||||
options.password
|
||||
);
|
||||
|
||||
// Apply custom fields if provided
|
||||
if ( options.xhrFields ) {
|
||||
|
||||
Reference in New Issue
Block a user