Land some additional tweaks related to running through JSLint.
This commit is contained in:
parent
fc08d0ea8d
commit
a4043cdcbf
|
@ -2,7 +2,7 @@ var jsc = now(),
|
||||||
rscript = /<script(.|\s)*?\/script>/gi,
|
rscript = /<script(.|\s)*?\/script>/gi,
|
||||||
rselectTextarea = /select|textarea/i,
|
rselectTextarea = /select|textarea/i,
|
||||||
rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
|
rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
|
||||||
jsre = /=\?(&|$)/,
|
jsre = /\=\?(&|$)/,
|
||||||
rquery = /\?/,
|
rquery = /\?/,
|
||||||
rts = /(\?|&)_=.*?(&|$)/,
|
rts = /(\?|&)_=.*?(&|$)/,
|
||||||
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
||||||
|
|
12
src/core.js
12
src/core.js
|
@ -49,7 +49,7 @@ var jQuery = function( selector, context ) {
|
||||||
|
|
||||||
// Save a reference to some core methods
|
// Save a reference to some core methods
|
||||||
toString = Object.prototype.toString,
|
toString = Object.prototype.toString,
|
||||||
hasOwnProperty = Object.prototype.hasOwnProperty,
|
hasOwn = Object.prototype.hasOwnProperty,
|
||||||
push = Array.prototype.push,
|
push = Array.prototype.push,
|
||||||
slice = Array.prototype.slice,
|
slice = Array.prototype.slice,
|
||||||
indexOf = Array.prototype.indexOf;
|
indexOf = Array.prototype.indexOf;
|
||||||
|
@ -450,9 +450,9 @@ jQuery.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not own constructor property must be Object
|
// Not own constructor property must be Object
|
||||||
if ( obj.constructor
|
if ( obj.constructor &&
|
||||||
&& !hasOwnProperty.call(obj, "constructor")
|
!hasOwn.call(obj, "constructor") &&
|
||||||
&& !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
|
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ jQuery.extend({
|
||||||
var key;
|
var key;
|
||||||
for ( key in obj ) {}
|
for ( key in obj ) {}
|
||||||
|
|
||||||
return key === undefined || hasOwnProperty.call( obj, key );
|
return key === undefined || hasOwn.call( obj, key );
|
||||||
},
|
},
|
||||||
|
|
||||||
isEmptyObject: function( obj ) {
|
isEmptyObject: function( obj ) {
|
||||||
|
@ -803,5 +803,5 @@ function access( elems, key, value, exec, fn, pass ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function now() {
|
function now() {
|
||||||
return (new Date).getTime();
|
return (new Date()).getTime();
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ jQuery.event = {
|
||||||
type = namespaces.shift();
|
type = namespaces.shift();
|
||||||
|
|
||||||
namespace = new RegExp("(^|\\.)" +
|
namespace = new RegExp("(^|\\.)" +
|
||||||
jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)")
|
jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
|
||||||
}
|
}
|
||||||
|
|
||||||
eventType = events[ type ];
|
eventType = events[ type ];
|
||||||
|
|
|
@ -205,7 +205,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
return jQuery.clean([html.replace(rinlinejQuery, "")
|
return jQuery.clean([html.replace(rinlinejQuery, "")
|
||||||
// Handle the case in IE 8 where action=/test/> self-closes a tag
|
// Handle the case in IE 8 where action=/test/> self-closes a tag
|
||||||
.replace(/=([^="'>\s]+\/)>/g, '="$1">')
|
.replace(/\=([^="'>\s]+\/)>/g, '="$1">')
|
||||||
.replace(rleadingWhitespace, "")], ownerDocument)[0];
|
.replace(rleadingWhitespace, "")], ownerDocument)[0];
|
||||||
} else {
|
} else {
|
||||||
return this.cloneNode(true);
|
return this.cloneNode(true);
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
var runtil = /Until$/,
|
var runtil = /Until$/,
|
||||||
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
||||||
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
||||||
rmultiselector = /,/,
|
rmultiselector = /,/;
|
||||||
slice = Array.prototype.slice;
|
|
||||||
|
|
||||||
// Implement the identical functionality for filter and not
|
// Implement the identical functionality for filter and not
|
||||||
var winnow = function( elements, qualifier, keep ) {
|
var winnow = function( elements, qualifier, keep ) {
|
||||||
|
|
Loading…
Reference in a new issue