});
});
cmds.push( next );
-
+
steps.apply( this, cmds );
}
"grunt-git-authors": "1.2.0",
"grunt-update-submodules": "0.2.0",
"grunt-contrib-watch": "0.3.1",
- "grunt-contrib-jshint": "0.1.1rc6",
+ "grunt-contrib-jshint": "0.3.0",
"grunt-contrib-uglify": "0.1.2",
"grunt": "0.4.1",
"gzip-js": "0.3.1",
var s = fn.indexOf('{')+1,
e = fn.lastIndexOf('}');
fn = fn.substring(s,e);
-
+
return benchmarkString(fn, times, name);
}
"expr": true,
"newcap": false,
"quotmark": "double",
- "regexdash": true,
"trailing": true,
"undef": true,
"unused": true,
+ "latedef": false,
+ "eqeqeq": true,
"maxerr": 100,
"eqnull": true,
"evil": true,
"sub": true,
+ "boss": true,
"browser": true,
"wsh": true,
parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!( parts &&
( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
);
}
options = elem.options,
values = jQuery.makeArray( value ),
i = options.length;
-
+
while ( i-- ) {
option = options[ i ];
if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
optionSet = true;
}
}
-
+
// force browsers to behave consistently when non-matching value is set
if ( !optionSet ) {
elem.selectedIndex = -1;
},
isWindow: function( obj ) {
+ /* jshint eqeqeq: false */
return obj != null && obj == obj.window;
},
jQuery.cleanData( [ elem ], true );
// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ /* jshint eqeqeq: false */
} else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+ /* jshint eqeqeq: true */
delete cache[ id ];
// When all else fails, null
}
function propFilter( props, specialEasing ) {
- var value, name, index, easing, hooks;
+ var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
});
function defaultPrefilter( elem, props, opts ) {
- /*jshint validthis:true */
+ /* jshint validthis: true */
var prop, index, length,
value, dataShow, toggle,
tween, hooks, oldfire,
}
};
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function( tween ) {
tmp = rtypenamespace.exec( types[t] ) || [];
type = origType = tmp[1];
namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
+
// There *must* be a type, no attaching namespace-only handlers
if ( !type ) {
continue;
// Avoid non-left-click bubbling in Firefox (#3861)
if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+ /* jshint eqeqeq: false */
for ( ; cur != this; cur = cur.parentNode || this ) {
+ /* jshint eqeqeq: true */
// Don't check non-elements (#13208)
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
} else {
delete jQuery.ajaxSettings;
}
-
+
// Cleanup globals
Globals.cleanup();
tmp.push( i, ": ", requestHeaders[ i ], "\n" );
}
tmp = tmp.join("");
-
+
strictEqual( data, tmp, "Headers were sent" );
strictEqual( xhr.getResponseHeader("Sample-Header"), "Hello World", "Sample header received" );
samePort = loc.port || ( loc.protocol === "http:" ? 80 : 443 ),
otherPort = loc.port === 666 ? 667 : 666,
otherProtocol = loc.protocol === "http:" ? "https:" : "http:";
-
+
return [
request(
loc.protocol + "//" + loc.host + ":" + samePort,
}]
};
});
-
+
ajaxTest( "jQuery.ajax() - events without context", 3, function() {
function nocallback( msg ) {
return function() {
});
ajaxTest( "jQuery.ajax() - cache", 12, function() {
-
+
var re = /_=(.*?)(&|$)/g;
-
+
function request( url, title ) {
return {
url: url,
error: true
};
}
-
+
return [
request(
"data/text.php",
}
}
]);
-
+
jQuery.each( [ " - Same Domain", " - Cross Domain" ], function( crossDomain, label ) {
ajaxTest( "#8205 - jQuery.ajax() - JSONP - re-use callbacks name" + label, 2, {
url: "data/jsonp.php",
});
jQuery.each( [ "as argument", "in settings object" ], function( inSetting, title ) {
-
+
function request( url, test ) {
return {
create: function() {
}
};
}
-
+
ajaxTest( "#10093 - jQuery.ajax() - falsy url " + title, 4, [
request( "", "empty string" ),
request( false ),
request( null ),
request( undefined )
]);
-
+
});
ajaxTest( "#11151 - jQuery.ajax() - parse error body", 2, {
request()
]
});
-
+
});
ajaxTest( "#13276 - jQuery.ajax() - compatibility between XML documents from ajax requests and parsed string", 1, {
strictEqual( ajaxXML.find("tab").length, 3, "Parsed node was added properly" );
}
});
-
+
ajaxTest( "#13292 - jQuery.ajax() - converter is bypassed for 204 requests", 3, {
url: "data/nocontent.php",
dataType: "testing",
});
//----------- jQuery.fn.load()
-
+
// check if load can be called with only url
asyncTest( "jQuery.fn.load( String )", 2, function() {
jQuery.ajaxSetup({
test("val() with non-matching values on dropdown list", function() {
expect( 3 );
-
+
jQuery("#select5").val( "" );
equal( jQuery("#select5").val(), null, "Non-matching set on select-one" );
-
+
var select6 = jQuery("<select multiple id=\"select6\"><option value=\"1\">A</option><option value=\"2\">B</option></select>").appendTo("#form");
jQuery(select6).val( "nothing" );
equal( jQuery(select6).val(), null, "Non-matching set (single value) on select-multiple" );
-
+
jQuery(select6).val( ["nothing1", "nothing2"] );
equal( jQuery(select6).val(), null, "Non-matching set (array of values) on select-multiple" );
-
+
select6.remove();
});