grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
dst: readOptionalJSON( "dist/.destination.json" ),
- compare_size: {
+ "compare_size": {
files: [ "dist/jquery.js", "dist/jquery.min.js" ],
options: {
compress: {
src: "src/**/*.js",
gruntfile: "Gruntfile.js",
- // Right know, check only test helpers
- test: [ "test/data/testrunner.js", "test/data/testinit.js" ],
- release: "build/*.js",
+ // Right now, check only test helpers
+ test: [ "test/data/testrunner.js" ],
+ release: [ "build/*.js", "!build/release-notes.js" ],
tasks: "build/tasks/*.js"
},
testswarm: {
- tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing".split( " " )
+ tests: [
+ "ajax",
+ "attributes",
+ "callbacks",
+ "core",
+ "css",
+ "data",
+ "deferred",
+ "dimensions",
+ "effects",
+ "event",
+ "manipulation",
+ "offset",
+ "queue",
+ "selector",
+ "serialize",
+ "support",
+ "traversing"
+ ]
},
watch: {
files: [ "<%= jshint.all.src %>" ],
sourceMappingURL: "jquery.min.map",
report: "min",
beautify: {
- ascii_only: true
+ "ascii_only": true
},
banner: "/*! jQuery v<%= pkg.version %> | " +
"(c) 2005, <%= grunt.template.today('yyyy') %> jQuery Foundation, Inc. | " +
"jquery.org/license */",
compress: {
- hoist_funs: false,
+ "hoist_funs": false,
loops: false,
unused: false
}
host: "bugs.jquery.com",
port: 80,
method: "GET",
- path: "/query?status=closed&resolution=fixed&max=400&component=!web&order=component&milestone=" + version
+ path: "/query?status=closed&resolution=fixed&max=400&" +
+ "component=!web&order=component&milestone=" + version
}, function( res ) {
var data = [];
var archiver = require( "archiver" )( "zip" ),
md5file = cdnFolder + "/" + cdn + "-md5.txt",
- output = fs.createWriteStream( cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip" );
+ output = fs.createWriteStream(
+ cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip"
+ );
output.on( "error", function( err ) {
throw err;
/**
* Special concat/build task to handle various jQuery build requirements
- * Concats AMD modules, removes their definitions, and includes/excludes specified modules
+ * Concats AMD modules, removes their definitions,
+ * and includes/excludes specified modules
*/
module.exports = function( grunt ) {
/**
* Strip all definitions generated by requirejs
* Convert "var" modules to var declarations
- * "var module" means the module only contains a return statement that should be converted to a var declaration
+ * "var module" means the module only contains a return
+ * statement that should be converted to a var declaration
* This is indicated by including the file in any "var" folder
* @param {String} name
* @param {String} path
grunt.registerMultiTask(
"build",
- "Concatenate source, remove sub AMD definitions, (include/exclude modules with +/- flags), embed date/version",
+ "Concatenate source, remove sub AMD definitions, " +
+ "(include/exclude modules with +/- flags), embed date/version",
function() {
var flag, index,
done = this.async(),
/**
* Recursively calls the excluder to remove on all modules in the list
* @param {Array} list
- * @param {String} [prepend] Prepend this to the module name. Indicates we're walking a directory
+ * @param {String} [prepend] Prepend this to the module name.
+ * Indicates we're walking a directory
*/
excludeList = function( list, prepend ) {
if ( list ) {
list.forEach(function( module ) {
// Exclude var modules as well
if ( module === "var" ) {
- excludeList( fs.readdirSync( srcFolder + prepend + module ), prepend + module );
+ excludeList(
+ fs.readdirSync( srcFolder + prepend + module ), prepend + module
+ );
return;
}
if ( prepend ) {
},
/**
* Adds the specified module to the excluded or included list, depending on the flag
- * @param {String} flag A module path relative to the src directory starting with + or - to indicate whether it should included or excluded
+ * @param {String} flag A module path relative to
+ * the src directory starting with + or - to indicate
+ * whether it should included or excluded
*/
excluder = function( flag ) {
var m = /^(\+|\-|)([\w\/-]+)$/.exec( flag ),
// It's fine if the directory is not there
try {
excludeList( fs.readdirSync( srcFolder + module ), module );
- } catch( e ) {
+ } catch ( e ) {
grunt.verbose.writeln( e );
}
}
} else {
grunt.log.error( "Module \"" + module + "\" is a mimimum requirement.");
if ( module === "selector" ) {
- grunt.log.error( "If you meant to replace Sizzle, use -sizzle instead." );
+ grunt.log.error(
+ "If you meant to replace Sizzle, use -sizzle instead."
+ );
}
}
} else {
// * none (implicit exclude)
// *:* all (implicit include)
// *:*:-css all except css and dependents (explicit > implicit)
- // *:*:-css:+effects same (excludes effects because explicit include is trumped by explicit exclude of dependency)
- // *:+effects none except effects and its dependencies (explicit include trumps implicit exclude of dependency)
+ // *:*:-css:+effects same (excludes effects because explicit include is
+ // trumped by explicit exclude of dependency)
+ // *:+effects none except effects and its dependencies
+ // (explicit include trumps implicit exclude of dependency)
delete flags[ "*" ];
for ( flag in flags ) {
excluder( flag );
// Turn off opt-in if necessary
if ( !optIn ) {
// Overwrite the default inclusions with the explicit ones provided
- config.rawText.jquery = "define([" + (included.length ? included.join(",") : "") + "]);";
+ config.rawText.jquery = "define([" +
+ (included.length ? included.join(",") : "") +
+ "]);";
}
// Trace dependencies and concatenate files
"grunt-contrib-uglify": "0.5.0",
"grunt-contrib-watch": "0.6.1",
"grunt-git-authors": "1.2.0",
- "grunt-jscs-checker": "0.4.1",
+ "grunt-jscs-checker": "0.6.1",
"grunt-jsonlint": "1.0.4",
"grunt-npmcopy": "0.1.0",
"gzip-js": "0.3.2",
inspected[ dataType ] = true;
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ if ( typeof dataTypeOrTransport === "string" &&
+ !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+
options.dataTypes.unshift( dataTypeOrTransport );
inspect( dataTypeOrTransport );
return false;
try {
response = conv( response );
} catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ return {
+ state: "parsererror",
+ error: conv ? e : "No conversion from " + prev + " to " + current
+ };
}
}
}
// Callbacks context
callbackContext = s.context || s,
// Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
+ globalEventContext = s.context &&
+ ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
// Deferreds
deferred = jQuery.Deferred(),
completeDeferred = jQuery.Callbacks("once memory"),
jqXHR.setRequestHeader(
"Accept",
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ s.dataTypes[0] ] +
+ ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
s.accepts[ "*" ]
);
}
// Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ if ( s.beforeSend &&
+ ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+
// Abort if not done already and return
return jqXHR.abort();
}
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
// 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/
jQuery.ajaxSettings.xhr = function() {
try {
return new XMLHttpRequest();
- } catch( e ) {}
+ } catch ( e ) {}
};
var xhrId = 0,
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 ) {
if ( value === null ) {
jQuery.removeAttr( elem, name );
- } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ } else if ( hooks && "set" in hooks &&
+ (ret = hooks.set( elem, value, name )) !== undefined ) {
+
return ret;
} else {
"../core",
"../var/rnotwhite",
"../var/strundefined",
- "../data/var/data_priv",
+ "../data/var/dataPriv",
"../core/init"
-], function( jQuery, rnotwhite, strundefined, data_priv ) {
+], function( jQuery, rnotwhite, strundefined, dataPriv ) {
var rclass = /[\t\r\n\f]/g;
if ( jQuery.isFunction( value ) ) {
return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ jQuery( this ).toggleClass(
+ value.call(this, i, this.className, stateVal), stateVal
+ );
});
}
} else if ( type === strundefined || type === "boolean" ) {
if ( this.className ) {
// store className if set
- data_priv.set( this, "__className__", this.className );
+ dataPriv.set( this, "__className__", this.className );
}
// If the element has a class name or if we're passed `false`,
// then remove the whole classname (if there was one, the above saved it).
// Otherwise bring back whatever was previously saved (if anything),
// falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
+ this.className = this.className || value === false ?
+ "" :
+ dataPriv.get( this, "__className__" ) || "";
}
});
},
i = 0,
l = this.length;
for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ if ( this[i].nodeType === 1 &&
+ (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+
return true;
}
}
propHooks: {
tabIndex: {
get: function( elem ) {
- return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
- elem.tabIndex :
- -1;
+ return elem.hasAttribute( "tabindex" ) ||
+ rfocusable.test( elem.nodeName ) || elem.href ?
+ elem.tabIndex :
+ -1;
}
}
}
if ( !arguments.length ) {
if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+ hooks = jQuery.valHooks[ elem.type ] ||
+ jQuery.valHooks[ elem.nodeName.toLowerCase() ];
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
return ret;
// IE6-9 doesn't update selected after form reset (#2551)
if ( ( option.selected || i === index ) &&
// Don't return options that are disabled or in a disabled optgroup
- ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+ ( support.optDisabled ?
+ !option.disabled : option.getAttribute( "disabled" ) === null ) &&
+ ( !option.parentNode.disabled ||
+ !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
// Get the specific value for the option
value = jQuery( option ).val();
firingLength = list.length;
firing = true;
for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false &&
+ options.stopOnFalse ) {
+
memory = false; // To prevent further calls using add
break;
}
}
// Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( deep && copy && ( jQuery.isPlainObject(copy) ||
+ (copyIsArray = jQuery.isArray(copy)) ) ) {
+
if ( copyIsArray ) {
copyIsArray = false;
clone = src && jQuery.isArray(src) ? src : [];
});
// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
+function(i, name) {
class2type[ "[object " + name + "]" ] = name.toLowerCase();
});
// Handle HTML strings
if ( typeof selector === "string" ) {
- if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
+ if ( selector[0] === "<" &&
+ selector[ selector.length - 1 ] === ">" &&
+ selector.length >= 3 ) {
+
// Assume that strings that start and end with <> are HTML and skip the regex check
match = [ null, selector, null ];
], function( jQuery, rsingleTag ) {
// data: string of html
-// context (optional): If specified, the fragment will be created in this context, defaults to document
+// context (optional): If specified, the fragment will be created in this context,
+// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( !data || typeof data !== "string" ) {
readyList = jQuery.Deferred();
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // We once tried to use readyState "interactive" here, but it caused issues like the one
+ // Catch cases where $(document).ready() is called
+ // after the browser event has already occurred.
+ // We once tried to use readyState "interactive" here,
+ // but it caused issues like the one
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
"./css/defaultDisplay",
"./css/addGetHookIf",
"./css/support",
- "./data/var/data_priv",
+ "./data/var/dataPriv",
"./core/init",
"./css/swap",
"./core/ready",
"./selector" // contains
], function( jQuery, pnum, access, rmargin, rnumnonpx, cssExpand, isHidden,
- getStyles, curCSS, defaultDisplay, addGetHookIf, support, data_priv ) {
+ getStyles, curCSS, defaultDisplay, addGetHookIf, support, dataPriv ) {
var
- // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // Swappable if display is none or starts with table
+ // except "table", "table-cell", or "table-caption"
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
continue;
}
- values[ index ] = data_priv.get( elem, "olddisplay" );
+ values[ index ] = dataPriv.get( elem, "olddisplay" );
display = elem.style.display;
if ( show ) {
// Reset the inline display of this element to learn if it is
// in a stylesheet to whatever the default browser style is
// for such an element
if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+ values[ index ] = dataPriv.access(
+ elem,
+ "olddisplay",
+ defaultDisplay(elem.nodeName)
+ );
}
} else {
hidden = isHidden( elem );
if ( display !== "none" || !hidden ) {
- data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ dataPriv.set(
+ elem,
+ "olddisplay",
+ hidden ? display : jQuery.css( elem, "display" )
+ );
}
}
}
origName = jQuery.camelCase( name ),
style = elem.style;
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+ name = jQuery.cssProps[ origName ] ||
+ ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
// Gets hook for the prefixed version, then unprefixed version
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
}
// If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ if ( !hooks || !("set" in hooks) ||
+ (value = hooks.set( elem, value, extra )) !== undefined ) {
+
style[ name ] = value;
}
} else {
// If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ if ( hooks && "get" in hooks &&
+ (ret = hooks.get( elem, false, extra )) !== undefined ) {
+
return ret;
}
origName = jQuery.camelCase( name );
// Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+ name = jQuery.cssProps[ origName ] ||
+ ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
// Try prefixed name followed by the unprefixed name
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
// Certain elements can have dimension info if we invisibly show them
// but it must have a current display style that would benefit
- return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
+ elem.offsetWidth === 0 ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
}
},
// Support: iOS < 6
// A tribute to the "awesome hack by Dean Edwards"
- // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ // iOS < 6 (at least) returns percentage for a larger set of values,
+ // but width seems to be reliably pixels
+ // this is against the CSSOM draft spec:
+ // http://dev.w3.org/csswg/cssom/#resolved-values
if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
// Remember the original values
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
// getDefaultComputedStyle might be reliably used only on attached element
- display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+ display = window.getDefaultComputedStyle &&
+ ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
- // Use of this method is a temporary fix (more like optimization) until something better comes along,
- // since it was removed from specification and supported only in FF
- style.display : jQuery.css( elem[ 0 ], "display" );
+ // Use of this method is a temporary fix (more like optimization)
+ // until something better comes along,
+ // since it was removed from specification and supported only in FF
+ style.display :
+
+ jQuery.css( elem[ 0 ], "display" );
// We don't have any data stored on the element,
// so use "detach" method as fast way to get rid of the element
if ( display === "none" || !display ) {
// Use the already-created iframe if possible
- iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+ iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ))
+ .appendTo( doc.documentElement );
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
doc = iframe[ 0 ].contentDocument;
// isHidden might be called from jQuery#filter function;
// in that case, element will be second argument
elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+ return jQuery.css( elem, "display" ) === "none" ||
+ !jQuery.contains( elem.ownerDocument, elem );
};
});
"./core",
"./var/rnotwhite",
"./core/access",
- "./data/var/data_priv",
- "./data/var/data_user"
-], function( jQuery, rnotwhite, access, data_priv, data_user ) {
+ "./data/var/dataPriv",
+ "./data/var/dataUser"
+], function( jQuery, rnotwhite, access, dataPriv, dataUser ) {
// Implementation Summary
//
+data + "" === data ? +data :
rbrace.test( data ) ? jQuery.parseJSON( data ) :
data;
- } catch( e ) {}
+ } catch ( e ) {}
// Make sure we set the data so it isn't changed later
- data_user.set( elem, key, data );
+ dataUser.set( elem, key, data );
} else {
data = undefined;
}
jQuery.extend({
hasData: function( elem ) {
- return data_user.hasData( elem ) || data_priv.hasData( elem );
+ return dataUser.hasData( elem ) || dataPriv.hasData( elem );
},
data: function( elem, name, data ) {
- return data_user.access( elem, name, data );
+ return dataUser.access( elem, name, data );
},
removeData: function( elem, name ) {
- data_user.remove( elem, name );
+ dataUser.remove( elem, name );
},
// TODO: Now that all calls to _data and _removeData have been replaced
- // with direct calls to data_priv methods, these can be deprecated.
+ // with direct calls to dataPriv methods, these can be deprecated.
_data: function( elem, name, data ) {
- return data_priv.access( elem, name, data );
+ return dataPriv.access( elem, name, data );
},
_removeData: function( elem, name ) {
- data_priv.remove( elem, name );
+ dataPriv.remove( elem, name );
}
});
// Gets all values
if ( key === undefined ) {
if ( this.length ) {
- data = data_user.get( elem );
+ data = dataUser.get( elem );
- if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+ if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
i = attrs.length;
while ( i-- ) {
}
}
}
- data_priv.set( elem, "hasDataAttrs", true );
+ dataPriv.set( elem, "hasDataAttrs", true );
}
}
// Sets multiple values
if ( typeof key === "object" ) {
return this.each(function() {
- data_user.set( this, key );
+ dataUser.set( this, key );
});
}
if ( elem && value === undefined ) {
// Attempt to get data from the cache
// with the key as-is
- data = data_user.get( elem, key );
+ data = dataUser.get( elem, key );
if ( data !== undefined ) {
return data;
}
// Attempt to get data from the cache
// with the key camelized
- data = data_user.get( elem, camelKey );
+ data = dataUser.get( elem, camelKey );
if ( data !== undefined ) {
return data;
}
this.each(function() {
// First, attempt to store a copy or reference of any
// data that might've been store with a camelCased key.
- var data = data_user.get( this, camelKey );
+ var data = dataUser.get( this, camelKey );
// For HTML5 data-* attribute interop, we have to
// store property names with dashes in a camelCase form.
// This might not apply to all properties...*
- data_user.set( this, camelKey, value );
+ dataUser.set( this, camelKey, value );
// *... In the case of properties that might _actually_
// have dashes, we need to also store a copy of that
// unchanged property.
if ( key.indexOf("-") !== -1 && data !== undefined ) {
- data_user.set( this, key, value );
+ dataUser.set( this, key, value );
}
});
}, null, value, arguments.length > 1, null, true );
removeData: function( key ) {
return this.each(function() {
- data_user.remove( this, key );
+ dataUser.remove( this, key );
});
}
});
--- /dev/null
+define([
+ "../Data"
+], function( Data ) {
+ return new Data();
+});
--- /dev/null
+define([
+ "../Data"
+], function( Data ) {
+ return new Data();
+});
+++ /dev/null
-define([
- "../Data"
-], function( Data ) {
- return new Data();
-});
+++ /dev/null
-define([
- "../Data"
-], function( Data ) {
- return new Data();
-});
.fail( newDefer.reject )
.progress( newDefer.notify );
} else {
- newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ newDefer[ tuple[ 0 ] + "With" ](
+ this === promise ? newDefer.promise() : this,
+ fn ? [ returned ] : arguments
+ );
}
});
});
length = resolveValues.length,
// the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+ remaining = length !== 1 ||
+ ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ // the master Deferred.
+ // If resolveValues consist of only a single Deferred, just use that.
deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
// Update function for both resolve and progress values
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
+ function( defaultExtra, funcName ) {
+
// Margin is only for outerHeight, outerWidth
jQuery.fn[ funcName ] = function( margin, value ) {
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
"./css/var/cssExpand",
"./css/var/isHidden",
"./css/defaultDisplay",
- "./data/var/data_priv",
+ "./data/var/dataPriv",
"./core/init",
"./effects/Tween",
"./css",
"./deferred",
"./traversing"
-], function( jQuery, pnum, cssExpand, isHidden, defaultDisplay, data_priv ) {
+], function( jQuery, pnum, cssExpand, isHidden, defaultDisplay, dataPriv ) {
var
fxNow, timerId,
// Update scale, tolerating zero or NaN from tween.cur(),
// break the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ } while (
+ scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations
+ );
}
// Update tween properties
orig = {},
style = elem.style,
hidden = elem.nodeType && isHidden( elem ),
- dataShow = data_priv.get( elem, "fxshow" );
+ dataShow = dataPriv.get( elem, "fxshow" );
// Handle queue: false promises
if ( !opts.queue ) {
// Test default display if display is currently "none"
checkDisplay = display === "none" ?
- data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+ dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
style.display = "inline-block";
toggle = toggle || value === "toggle";
if ( value === ( hidden ? "hide" : "show" ) ) {
- // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ // If there is dataShow left over from a stopped hide or show
+ // and we are going to proceed with show, we should pretend to be hidden
if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
hidden = true;
} else {
hidden = dataShow.hidden;
}
} else {
- dataShow = data_priv.access( elem, "fxshow", {} );
+ dataShow = dataPriv.access( elem, "fxshow", {} );
}
// Store state if its toggle - enables .stop().toggle() to "reverse"
anim.done(function() {
var prop;
- data_priv.remove( elem, "fxshow" );
+ dataPriv.remove( elem, "fxshow" );
for ( prop in orig ) {
jQuery.style( elem, prop, orig[ prop ] );
}
var anim = Animation( this, jQuery.extend( {}, prop ), optall );
// Empty animations, or finishing resolves immediately
- if ( empty || data_priv.get( this, "finish" ) ) {
+ if ( empty || dataPriv.get( this, "finish" ) ) {
anim.stop( true );
}
};
var dequeue = true,
index = type != null && type + "queueHooks",
timers = jQuery.timers,
- data = data_priv.get( this );
+ data = dataPriv.get( this );
if ( index ) {
if ( data[ index ] && data[ index ].stop ) {
}
for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ if ( timers[ index ].elem === this &&
+ (type == null || timers[ index ].queue === type) ) {
+
timers[ index ].anim.stop( gotoEnd );
dequeue = false;
timers.splice( index, 1 );
}
return this.each(function() {
var index,
- data = data_priv.get( this ),
+ data = dataPriv.get( this ),
queue = data[ type + "queue" ],
hooks = data[ type + "queueHooks" ],
timers = jQuery.timers,
// Use .style if available and use plain properties where available.
if ( jQuery.fx.step[ tween.prop ] ) {
jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ } else if ( tween.elem.style &&
+ ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
+ jQuery.cssHooks[ tween.prop ] ) ) {
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
} else {
tween.elem[ tween.prop ] = tween.now;
"./var/hasOwn",
"./var/slice",
"./event/support",
- "./data/var/data_priv",
+ "./data/var/dataPriv",
"./core/init",
"./data/accepts",
"./selector"
-], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, data_priv ) {
+], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, dataPriv ) {
var
rkeyEvent = /^key/,
var handleObjIn, eventHandle, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
- elemData = data_priv.get( elem );
+ elemData = dataPriv.get( elem );
// Don't attach events to noData or text/comment nodes (but allow plain objects)
if ( !elemData ) {
handlers.delegateCount = 0;
// Only use addEventListener if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ if ( !special.setup ||
+ special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+
if ( elem.addEventListener ) {
elem.addEventListener( type, eventHandle, false );
}
var j, origCount, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
- elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+ elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
if ( !elemData || !(events = elemData.events) ) {
return;
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ ( !selector || selector === handleObj.selector ||
+ selector === "**" && handleObj.selector ) ) {
handlers.splice( j, 1 );
if ( handleObj.selector ) {
// Remove generic event handler if we removed something and no more handlers exist
// (avoids potential for endless recursion during removal of special event handlers)
if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ if ( !special.teardown ||
+ special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+
jQuery.removeEvent( elem, type, elemData.handle );
}
// Remove the expando if it's no longer used
if ( jQuery.isEmptyObject( events ) ) {
delete elemData.handle;
- data_priv.remove( elem, "events" );
+ dataPriv.remove( elem, "events" );
}
},
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
event.isTrigger = onlyHandlers ? 2 : 3;
event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
+ event.rnamespace = event.namespace ?
new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
null;
special.bindType || type;
// jQuery handler
- handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
+ handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
+ dataPriv.get( cur, "handle" );
if ( handle ) {
handle.apply( cur, data );
}
var i, j, ret, matched, handleObj,
handlerQueue = [],
args = slice.call( arguments ),
- handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
+ handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
special = jQuery.event.special[ event.type ] || {};
// Use the fix-ed jQuery.Event rather than the (read-only) native event
event.currentTarget = matched.elem;
j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+ while ( (handleObj = matched.handlers[ j++ ]) &&
+ !event.isImmediatePropagationStopped() ) {
// Triggered event must either 1) have no namespace, or 2) have namespace(s)
// a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+ if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
event.handleObj = handleObj;
event.data = handleObj.data;
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle ||
+ handleObj.handler ).apply( matched.elem, args );
if ( ret !== undefined ) {
if ( (event.result = ret) === false ) {
},
// Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+ props: ( "altKey bubbles cancelable ctrlKey currentTarget eventPhase " +
+ "metaKey relatedTarget shiftKey target timeStamp view which" ).split(" "),
fixHooks: {},
},
mouseHooks: {
- props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
+ "screenX screenY toElement" ).split(" "),
filter: function( event, original ) {
var eventDoc, doc, body,
button = original.button;
doc = eventDoc.documentElement;
body = eventDoc.body;
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ event.pageX = original.clientX +
+ ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
+ ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY +
+ ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
+ ( doc && doc.clientTop || body && body.clientTop || 0 );
}
// Add which for click: 1 === left; 2 === middle; 3 === right
jQuery.event.special[ fix ] = {
setup: function() {
var doc = this.ownerDocument || this,
- attaches = data_priv.access( doc, fix );
+ attaches = dataPriv.access( doc, fix );
if ( !attaches ) {
doc.addEventListener( orig, handler, true );
}
- data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
+ dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
},
teardown: function() {
var doc = this.ownerDocument || this,
- attaches = data_priv.access( doc, fix ) - 1;
+ attaches = dataPriv.access( doc, fix ) - 1;
if ( !attaches ) {
doc.removeEventListener( orig, handler, true );
- data_priv.remove( doc, fix );
+ dataPriv.remove( doc, fix );
} else {
- data_priv.access( doc, fix, attaches );
+ dataPriv.access( doc, fix, attaches );
}
}
};
// ( event ) dispatched jQuery.Event
handleObj = types.handleObj;
jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.namespace ?
+ handleObj.origType + "." + handleObj.namespace :
+ handleObj.origType,
handleObj.selector,
handleObj.handler
);
], function( jQuery ) {
// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+jQuery.each([
+ "ajaxStart",
+ "ajaxStop",
+ "ajaxComplete",
+ "ajaxError",
+ "ajaxSuccess",
+ "ajaxSend"
+], function( i, type ) {
jQuery.fn[ type ] = function( fn ) {
return this.on( type, fn );
};
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+ "change select submit keydown keypress keyup error contextmenu").split(" "),
+ function( i, name ) {
// Handle event binding
jQuery.fn[ name ] = function( data, fn ) {
},
undelegate: function( selector, types, fn ) {
// ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ return arguments.length === 1 ?
+ this.off( selector, "**" ) :
+ this.off( types, selector || "**", fn );
}
});
"./core/access",
"./manipulation/var/rcheckableType",
"./manipulation/support",
- "./data/var/data_priv",
- "./data/var/data_user",
+ "./data/var/dataPriv",
+ "./data/var/dataUser",
"./core/init",
"./data/accepts",
"./traversing",
"./selector",
"./event"
-], function( jQuery, concat, push, access, rcheckableType, support, data_priv, data_user ) {
+], function( jQuery, concat, push, access, rcheckableType, support, dataPriv, dataUser ) {
var
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
l = elems.length;
for ( ; i < l; i++ ) {
- data_priv.set(
- elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+ dataPriv.set(
+ elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" )
);
}
}
}
// 1. Copy private data: events, handlers, etc.
- if ( data_priv.hasData( src ) ) {
- pdataOld = data_priv.access( src );
- pdataCur = data_priv.set( dest, pdataOld );
+ if ( dataPriv.hasData( src ) ) {
+ pdataOld = dataPriv.access( src );
+ pdataCur = dataPriv.set( dest, pdataOld );
events = pdataOld.events;
if ( events ) {
}
// 2. Copy user data
- if ( data_user.hasData( src ) ) {
- udataOld = data_user.access( src );
+ if ( dataUser.hasData( src ) ) {
+ udataOld = dataUser.access( src );
udataCur = jQuery.extend( {}, udataOld );
- data_user.set( dest, udataCur );
+ dataUser.set( dest, udataCur );
}
}
for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
if ( jQuery.acceptData( elem ) ) {
- key = elem[ data_priv.expando ];
+ key = elem[ dataPriv.expando ];
- if ( key && (data = data_priv.cache[ key ]) ) {
+ if ( key && (data = dataPriv.cache[ key ]) ) {
if ( data.events ) {
for ( type in data.events ) {
if ( special[ type ] ) {
}
}
}
- if ( data_priv.cache[ key ] ) {
+ if ( dataPriv.cache[ key ] ) {
// Discard any remaining `private` data
- delete data_priv.cache[ key ];
+ delete dataPriv.cache[ key ];
}
}
}
// Discard any remaining `user` data
- delete data_user.cache[ elem[ data_user.expando ] ];
+ delete dataUser.cache[ elem[ dataUser.expando ] ];
}
}
});
elem = 0;
// If using innerHTML throws an exception, use the fallback method
- } catch( e ) {}
+ } catch ( e ) {}
}
if ( elem ) {
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
hasScripts = scripts.length;
- // Use the original fragment for the last item instead of the first because it can end up
+ // Use the original fragment for the last item
+ // instead of the first because it can end up
// being emptied incorrectly in certain situations (#8070).
for ( ; i < l; i++ ) {
node = fragment;
for ( i = 0; i < hasScripts; i++ ) {
node = scripts[ i ];
if ( rscriptType.test( node.type || "" ) &&
- !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+ !dataPriv.access( node, "globalEval" ) &&
+ jQuery.contains( doc, node ) ) {
if ( node.src ) {
// Optional AJAX dependency, but won't run scripts if not present
elem = this[ 0 ],
parentOffset = { top: 0, left: 0 };
- // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
+ // because it is its only offset parent
if ( jQuery.css( elem, "position" ) === "fixed" ) {
// Assume getBoundingClientRect is there when computed position is fixed
offset = elem.getBoundingClientRect();
return this.map(function() {
var offsetParent = this.offsetParent || docElem;
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) &&
+ jQuery.css( offsetParent, "position" ) === "static" ) ) {
offsetParent = offsetParent.offsetParent;
}
define([
"./core",
- "./data/var/data_priv",
+ "./data/var/dataPriv",
"./deferred",
"./callbacks"
-], function( jQuery, data_priv ) {
+], function( jQuery, dataPriv ) {
jQuery.extend({
queue: function( elem, type, data ) {
if ( elem ) {
type = ( type || "fx" ) + "queue";
- queue = data_priv.get( elem, type );
+ queue = dataPriv.get( elem, type );
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
if ( !queue || jQuery.isArray( data ) ) {
- queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+ queue = dataPriv.access( elem, type, jQuery.makeArray(data) );
} else {
queue.push( data );
}
// Not public - generate a queueHooks object, or return the current one
_queueHooks: function( elem, type ) {
var key = type + "queueHooks";
- return data_priv.get( elem, key ) || data_priv.access( elem, key, {
+ return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
empty: jQuery.Callbacks("once memory").add(function() {
- data_priv.remove( elem, [ type + "queue", key ] );
+ dataPriv.remove( elem, [ type + "queue", key ] );
})
});
}
type = type || "fx";
while ( i-- ) {
- tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+ tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
if ( tmp && tmp.empty ) {
count++;
tmp.empty.add( resolve );
* customize this stub for the project's specific needs.
*/
-var docElem = window.document.documentElement,
- selector_hasDuplicate,
+var hasDuplicate,
+ docElem = window.document.documentElement,
matches = docElem.matches ||
docElem.webkitMatchesSelector ||
docElem.mozMatchesSelector ||
docElem.oMatchesSelector ||
docElem.msMatchesSelector,
- selector_sortOrder = function( a, b ) {
+ sortOrder = function( a, b ) {
// Flag for duplicate removal
if ( a === b ) {
- selector_hasDuplicate = true;
+ hasDuplicate = true;
return 0;
}
- var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+ var compare = b.compareDocumentPosition &&
+ a.compareDocumentPosition &&
+ a.compareDocumentPosition( b );
if ( compare ) {
// Disconnected nodes
i = 0,
j = 0;
- selector_hasDuplicate = false;
- results.sort( selector_sortOrder );
+ hasDuplicate = false;
+ results.sort( sortOrder );
- if ( selector_hasDuplicate ) {
+ if ( hasDuplicate ) {
while ( (elem = results[i++]) ) {
if ( elem === results[ i ] ) {
j = duplicates.push( i );
} else {
// Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ buildParams(
+ prefix + "[" + ( typeof v === "object" ? i : "" ) + "]",
+ v,
+ traditional,
+ add
+ );
}
});
function loadFixture() {
var src = url( "./data/" + fileName + ".html" ),
iframe = jQuery( "<iframe />" ).appendTo( "body" )[ 0 ];
- iframe.style.cssText = "width: 500px; height: 500px; position: absolute; top: -600px; left: -600px; visibility: hidden;";
+ iframe.style.cssText = "width: 500px; height: 500px; position: absolute; " +
+ "top: -600px; left: -600px; visibility: hidden;";
iframe.contentWindow.location = src;
return iframe;
// Load the TestSwarm listener if swarmURL is in the address.
if ( loadSwarm ) {
- require( [ "http://swarm.jquery.org/js/inject.js?" + (new Date()).getTime() ], function() {
+ require( [ "http://swarm.jquery.org/js/inject.js?" + (new Date()).getTime() ],
+ function() {
QUnit.start();
});
} else {
* @param {string} key
*/
QUnit.expectJqData = function( elems, key ) {
- var i, elem, expando;
+ var i, elem, expando,
+ currentEnv = "current_testEnvironment";
// As of jQuery 2.0, there will be no "cache"-data is
// stored and managed completely below the API surface
if ( jQuery.cache ) {
- QUnit.current_testEnvironment.checkJqData = true;
+ QUnit[ currentEnv ].checkJqData = true;
if ( elems.jquery && elems.toArray ) {
elems = elems.toArray();
// Since this method was called it means some data was
// expected to be found, but since there is nothing, fail early
// (instead of in teardown).
- notStrictEqual( expando, undefined, "Target for expectJqData must have an expando, for else there can be no data to expect." );
+ notStrictEqual(
+ expando,
+ undefined,
+ "Target for expectJqData must have an expando, " +
+ "for else there can be no data to expect."
+ );
} else {
if ( expectedDataKeys[ expando ] ) {
expectedDataKeys[ expando ].push( key );
QUnit.config.urlConfig.push({
id: "jqdata",
label: "Always check jQuery.data",
- tooltip: "Trigger QUnit.expectJqData detection for all tests instead of just the ones that call it"
+ tooltip: "Trigger QUnit.expectJqData detection for all tests " +
+ "instead of just the ones that call it"
});
/**
}
// In case it was removed from cache before (or never there in the first place)
for ( i in expectedDataKeys ) {
- deepEqual( expectedDataKeys[ i ], undefined, "No unexpected keys were left in jQuery.cache (#" + i + ")" );
+ deepEqual(
+ expectedDataKeys[ i ],
+ undefined,
+ "No unexpected keys were left in jQuery.cache (#" + i + ")"
+ );
delete expectedDataKeys[ i ];
}
}
++cacheLength;
}
- // Because QUnit doesn't have a mechanism for retrieving the number of expected assertions for a test,
- // if we unconditionally assert any of these, the test will fail with too many assertions :|
+ // Because QUnit doesn't have a mechanism for retrieving
+ // the number of expected assertions for a test,
+ // if we unconditionally assert any of these,
+ // the test will fail with too many assertions :|
if ( cacheLength !== oldCacheLength ) {
equal( cacheLength, oldCacheLength, "No unit tests leak memory in jQuery.cache" );
oldCacheLength = cacheLength;