Update reference docs with most recent version of brodocs (#4600)
* Update 1.7 apidocs with new brodocs * Update 1.7 resource reference docs with new brodocs * Update 1.7 kubectl reference docs with new brodocs
This commit is contained in:
committed by
Andrew Chen
parent
4b004cf717
commit
217c86642f
+6
@@ -293,3 +293,9 @@ Damian Senn <jquery@topaxi.codes>
|
||||
Ralin Chimev <ralin.chimev@gmail.com>
|
||||
Felipe Sateler <fsateler@gmail.com>
|
||||
Christophe Tafani-Dereeper <christophetd@hotmail.fr>
|
||||
Manoj Kumar <nithmanoj@gmail.com>
|
||||
David Broder-Rodgers <broder93@gmail.com>
|
||||
Alex Louden <alex@louden.com>
|
||||
Alex Padilla <alexonezero@outlook.com>
|
||||
南漂一卒 <shiy007@qq.com>
|
||||
karan-96 <karanbatra96@gmail.com>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
Copyright JS Foundation and other contributors, https://js.foundation/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
|
||||
+3
-1
@@ -5,6 +5,8 @@
|
||||
For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).
|
||||
For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).
|
||||
|
||||
If upgrading, please see the [blog post for 3.2.1](https://blog.jquery.com/2017/03/20/jquery-3-2-1-now-available/). This includes notable differences from the previous version and a more readable changelog.
|
||||
|
||||
## Including jQuery
|
||||
|
||||
Below are some of the most common ways to include jQuery.
|
||||
@@ -14,7 +16,7 @@ Below are some of the most common ways to include jQuery.
|
||||
#### Script tag
|
||||
|
||||
```html
|
||||
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
||||
```
|
||||
|
||||
#### Babel
|
||||
|
||||
+3
-9
@@ -24,7 +24,7 @@ define( [
|
||||
"use strict";
|
||||
|
||||
var
|
||||
version = "3.1.1",
|
||||
version = "3.2.1",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
@@ -172,11 +172,11 @@ jQuery.extend = jQuery.fn.extend = function() {
|
||||
|
||||
// Recurse if we're merging plain objects or arrays
|
||||
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
||||
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
||||
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
||||
|
||||
if ( copyIsArray ) {
|
||||
copyIsArray = false;
|
||||
clone = src && jQuery.isArray( src ) ? src : [];
|
||||
clone = src && Array.isArray( src ) ? src : [];
|
||||
|
||||
} else {
|
||||
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
||||
@@ -215,8 +215,6 @@ jQuery.extend( {
|
||||
return jQuery.type( obj ) === "function";
|
||||
},
|
||||
|
||||
isArray: Array.isArray,
|
||||
|
||||
isWindow: function( obj ) {
|
||||
return obj != null && obj === obj.window;
|
||||
},
|
||||
@@ -291,10 +289,6 @@ jQuery.extend( {
|
||||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
||||
},
|
||||
|
||||
nodeName: function( elem, name ) {
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
},
|
||||
|
||||
each: function( obj, callback ) {
|
||||
var length, i = 0;
|
||||
|
||||
|
||||
+173
-140
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.1.1
|
||||
* jQuery JavaScript Library v3.2.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2016-09-22T22:30Z
|
||||
* Date: 2017-03-20T18:59Z
|
||||
*/
|
||||
( function( global, factory ) {
|
||||
|
||||
@@ -88,7 +88,7 @@ var support = {};
|
||||
|
||||
|
||||
var
|
||||
version = "3.1.1",
|
||||
version = "3.2.1",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
@@ -236,11 +236,11 @@ jQuery.extend = jQuery.fn.extend = function() {
|
||||
|
||||
// Recurse if we're merging plain objects or arrays
|
||||
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
||||
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
||||
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
||||
|
||||
if ( copyIsArray ) {
|
||||
copyIsArray = false;
|
||||
clone = src && jQuery.isArray( src ) ? src : [];
|
||||
clone = src && Array.isArray( src ) ? src : [];
|
||||
|
||||
} else {
|
||||
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
||||
@@ -279,8 +279,6 @@ jQuery.extend( {
|
||||
return jQuery.type( obj ) === "function";
|
||||
},
|
||||
|
||||
isArray: Array.isArray,
|
||||
|
||||
isWindow: function( obj ) {
|
||||
return obj != null && obj === obj.window;
|
||||
},
|
||||
@@ -355,10 +353,6 @@ jQuery.extend( {
|
||||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
||||
},
|
||||
|
||||
nodeName: function( elem, name ) {
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
},
|
||||
|
||||
each: function( obj, callback ) {
|
||||
var length, i = 0;
|
||||
|
||||
@@ -2843,6 +2837,13 @@ var siblings = function( n, elem ) {
|
||||
|
||||
var rneedsContext = jQuery.expr.match.needsContext;
|
||||
|
||||
|
||||
|
||||
function nodeName( elem, name ) {
|
||||
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
|
||||
};
|
||||
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||
|
||||
|
||||
@@ -3194,7 +3195,18 @@ jQuery.each( {
|
||||
return siblings( elem.firstChild );
|
||||
},
|
||||
contents: function( elem ) {
|
||||
return elem.contentDocument || jQuery.merge( [], elem.childNodes );
|
||||
if ( nodeName( elem, "iframe" ) ) {
|
||||
return elem.contentDocument;
|
||||
}
|
||||
|
||||
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
|
||||
// Treat the template element as a regular one in browsers that
|
||||
// don't support it.
|
||||
if ( nodeName( elem, "template" ) ) {
|
||||
elem = elem.content || elem;
|
||||
}
|
||||
|
||||
return jQuery.merge( [], elem.childNodes );
|
||||
}
|
||||
}, function( name, fn ) {
|
||||
jQuery.fn[ name ] = function( until, selector ) {
|
||||
@@ -3292,7 +3304,7 @@ jQuery.Callbacks = function( options ) {
|
||||
fire = function() {
|
||||
|
||||
// Enforce single-firing
|
||||
locked = options.once;
|
||||
locked = locked || options.once;
|
||||
|
||||
// Execute callbacks for all pending executions,
|
||||
// respecting firingIndex overrides and runtime changes
|
||||
@@ -3461,7 +3473,7 @@ function Thrower( ex ) {
|
||||
throw ex;
|
||||
}
|
||||
|
||||
function adoptValue( value, resolve, reject ) {
|
||||
function adoptValue( value, resolve, reject, noValue ) {
|
||||
var method;
|
||||
|
||||
try {
|
||||
@@ -3477,9 +3489,10 @@ function adoptValue( value, resolve, reject ) {
|
||||
// Other non-thenables
|
||||
} else {
|
||||
|
||||
// Support: Android 4.0 only
|
||||
// Strict mode functions invoked without .call/.apply get global-object context
|
||||
resolve.call( undefined, value );
|
||||
// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
|
||||
// * false: [ value ].slice( 0 ) => resolve( value )
|
||||
// * true: [ value ].slice( 1 ) => resolve()
|
||||
resolve.apply( undefined, [ value ].slice( noValue ) );
|
||||
}
|
||||
|
||||
// For Promises/A+, convert exceptions into rejections
|
||||
@@ -3489,7 +3502,7 @@ function adoptValue( value, resolve, reject ) {
|
||||
|
||||
// Support: Android 4.0 only
|
||||
// Strict mode functions invoked without .call/.apply get global-object context
|
||||
reject.call( undefined, value );
|
||||
reject.apply( undefined, [ value ] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3814,7 +3827,8 @@ jQuery.extend( {
|
||||
|
||||
// Single- and empty arguments are adopted like Promise.resolve
|
||||
if ( remaining <= 1 ) {
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
||||
!remaining );
|
||||
|
||||
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
||||
if ( master.state() === "pending" ||
|
||||
@@ -3886,15 +3900,6 @@ jQuery.extend( {
|
||||
// the ready event fires. See #6781
|
||||
readyWait: 1,
|
||||
|
||||
// Hold (or release) the ready event
|
||||
holdReady: function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
},
|
||||
|
||||
// Handle when the DOM is ready
|
||||
ready: function( wait ) {
|
||||
|
||||
@@ -4130,7 +4135,7 @@ Data.prototype = {
|
||||
if ( key !== undefined ) {
|
||||
|
||||
// Support array or space separated string of keys
|
||||
if ( jQuery.isArray( key ) ) {
|
||||
if ( Array.isArray( key ) ) {
|
||||
|
||||
// If key is an array of keys...
|
||||
// We always set camelCase keys, so remove that.
|
||||
@@ -4356,7 +4361,7 @@ jQuery.extend( {
|
||||
|
||||
// Speed up dequeue by getting out quickly if this is just a lookup
|
||||
if ( data ) {
|
||||
if ( !queue || jQuery.isArray( data ) ) {
|
||||
if ( !queue || Array.isArray( data ) ) {
|
||||
queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
|
||||
} else {
|
||||
queue.push( data );
|
||||
@@ -4733,7 +4738,7 @@ function getAll( context, tag ) {
|
||||
ret = [];
|
||||
}
|
||||
|
||||
if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {
|
||||
if ( tag === undefined || tag && nodeName( context, tag ) ) {
|
||||
return jQuery.merge( [ context ], ret );
|
||||
}
|
||||
|
||||
@@ -5340,7 +5345,7 @@ jQuery.event = {
|
||||
|
||||
// For checkbox, fire native event so checked state will be right
|
||||
trigger: function() {
|
||||
if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
|
||||
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
|
||||
this.click();
|
||||
return false;
|
||||
}
|
||||
@@ -5348,7 +5353,7 @@ jQuery.event = {
|
||||
|
||||
// For cross-browser consistency, don't fire native .click() on links
|
||||
_default: function( event ) {
|
||||
return jQuery.nodeName( event.target, "a" );
|
||||
return nodeName( event.target, "a" );
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5625,11 +5630,12 @@ var
|
||||
rscriptTypeMasked = /^true\/(.*)/,
|
||||
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
||||
|
||||
// Prefer a tbody over its parent table for containing new rows
|
||||
function manipulationTarget( elem, content ) {
|
||||
if ( jQuery.nodeName( elem, "table" ) &&
|
||||
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
||||
if ( nodeName( elem, "table" ) &&
|
||||
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
||||
|
||||
return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
|
||||
return jQuery( ">tbody", elem )[ 0 ] || elem;
|
||||
}
|
||||
|
||||
return elem;
|
||||
@@ -6159,12 +6165,18 @@ var getStyles = function( elem ) {
|
||||
|
||||
function curCSS( elem, name, computed ) {
|
||||
var width, minWidth, maxWidth, ret,
|
||||
|
||||
// Support: Firefox 51+
|
||||
// Retrieving style before computed somehow
|
||||
// fixes an issue with getting wrong values
|
||||
// on detached elements
|
||||
style = elem.style;
|
||||
|
||||
computed = computed || getStyles( elem );
|
||||
|
||||
// Support: IE <=9 only
|
||||
// getPropertyValue is only needed for .css('filter') (#12537)
|
||||
// getPropertyValue is needed for:
|
||||
// .css('filter') (IE 9 only, #12537)
|
||||
// .css('--customProperty) (#3144)
|
||||
if ( computed ) {
|
||||
ret = computed.getPropertyValue( name ) || computed[ name ];
|
||||
|
||||
@@ -6230,6 +6242,7 @@ var
|
||||
// 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]).+)/,
|
||||
rcustomProp = /^--/,
|
||||
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
||||
cssNormalTransform = {
|
||||
letterSpacing: "0",
|
||||
@@ -6259,6 +6272,16 @@ function vendorPropName( name ) {
|
||||
}
|
||||
}
|
||||
|
||||
// Return a property mapped along what jQuery.cssProps suggests or to
|
||||
// a vendor prefixed property.
|
||||
function finalPropName( name ) {
|
||||
var ret = jQuery.cssProps[ name ];
|
||||
if ( !ret ) {
|
||||
ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function setPositiveNumber( elem, value, subtract ) {
|
||||
|
||||
// Any relative (+/-) values have already been
|
||||
@@ -6319,44 +6342,31 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
||||
|
||||
function getWidthOrHeight( elem, name, extra ) {
|
||||
|
||||
// Start with offset property, which is equivalent to the border-box value
|
||||
var val,
|
||||
valueIsBorderBox = true,
|
||||
// Start with computed style
|
||||
var valueIsBorderBox,
|
||||
styles = getStyles( elem ),
|
||||
val = curCSS( elem, name, styles ),
|
||||
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a disconnected node
|
||||
// in IE throws an error.
|
||||
if ( elem.getClientRects().length ) {
|
||||
val = elem.getBoundingClientRect()[ name ];
|
||||
// Computed unit is not pixels. Stop here and return.
|
||||
if ( rnumnonpx.test( val ) ) {
|
||||
return val;
|
||||
}
|
||||
|
||||
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
||||
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
||||
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
||||
if ( val <= 0 || val == null ) {
|
||||
// Check for style in case a browser which returns unreliable values
|
||||
// for getComputedStyle silently falls back to the reliable elem.style
|
||||
valueIsBorderBox = isBorderBox &&
|
||||
( support.boxSizingReliable() || val === elem.style[ name ] );
|
||||
|
||||
// Fall back to computed then uncomputed css if necessary
|
||||
val = curCSS( elem, name, styles );
|
||||
if ( val < 0 || val == null ) {
|
||||
val = elem.style[ name ];
|
||||
}
|
||||
|
||||
// Computed unit is not pixels. Stop here and return.
|
||||
if ( rnumnonpx.test( val ) ) {
|
||||
return val;
|
||||
}
|
||||
|
||||
// Check for style in case a browser which returns unreliable values
|
||||
// for getComputedStyle silently falls back to the reliable elem.style
|
||||
valueIsBorderBox = isBorderBox &&
|
||||
( support.boxSizingReliable() || val === elem.style[ name ] );
|
||||
|
||||
// Normalize "", auto, and prepare for extra
|
||||
val = parseFloat( val ) || 0;
|
||||
// Fall back to offsetWidth/Height when value is "auto"
|
||||
// This happens for inline elements with no explicit setting (gh-3571)
|
||||
if ( val === "auto" ) {
|
||||
val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ];
|
||||
}
|
||||
|
||||
// Normalize "", auto, and prepare for extra
|
||||
val = parseFloat( val ) || 0;
|
||||
|
||||
// Use the active box-sizing model to add/subtract irrelevant styles
|
||||
return ( val +
|
||||
augmentWidthOrHeight(
|
||||
@@ -6420,10 +6430,15 @@ jQuery.extend( {
|
||||
// Make sure that we're working with the right name
|
||||
var ret, type, hooks,
|
||||
origName = jQuery.camelCase( name ),
|
||||
isCustomProp = rcustomProp.test( name ),
|
||||
style = elem.style;
|
||||
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
// Make sure that we're working with the right name. We don't
|
||||
// want to query the value if it is a CSS custom property
|
||||
// since they are user-defined.
|
||||
if ( !isCustomProp ) {
|
||||
name = finalPropName( origName );
|
||||
}
|
||||
|
||||
// Gets hook for the prefixed version, then unprefixed version
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
@@ -6459,7 +6474,11 @@ jQuery.extend( {
|
||||
if ( !hooks || !( "set" in hooks ) ||
|
||||
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
||||
|
||||
style[ name ] = value;
|
||||
if ( isCustomProp ) {
|
||||
style.setProperty( name, value );
|
||||
} else {
|
||||
style[ name ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -6478,11 +6497,15 @@ jQuery.extend( {
|
||||
|
||||
css: function( elem, name, extra, styles ) {
|
||||
var val, num, hooks,
|
||||
origName = jQuery.camelCase( name );
|
||||
origName = jQuery.camelCase( name ),
|
||||
isCustomProp = rcustomProp.test( name );
|
||||
|
||||
// Make sure that we're working with the right name
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
// Make sure that we're working with the right name. We don't
|
||||
// want to modify the value if it is a CSS custom property
|
||||
// since they are user-defined.
|
||||
if ( !isCustomProp ) {
|
||||
name = finalPropName( origName );
|
||||
}
|
||||
|
||||
// Try prefixed name followed by the unprefixed name
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
@@ -6507,6 +6530,7 @@ jQuery.extend( {
|
||||
num = parseFloat( val );
|
||||
return extra === true || isFinite( num ) ? num || 0 : val;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
} );
|
||||
@@ -6606,7 +6630,7 @@ jQuery.fn.extend( {
|
||||
map = {},
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isArray( name ) ) {
|
||||
if ( Array.isArray( name ) ) {
|
||||
styles = getStyles( elem );
|
||||
len = name.length;
|
||||
|
||||
@@ -6744,13 +6768,18 @@ jQuery.fx.step = {};
|
||||
|
||||
|
||||
var
|
||||
fxNow, timerId,
|
||||
fxNow, inProgress,
|
||||
rfxtypes = /^(?:toggle|show|hide)$/,
|
||||
rrun = /queueHooks$/;
|
||||
|
||||
function raf() {
|
||||
if ( timerId ) {
|
||||
window.requestAnimationFrame( raf );
|
||||
function schedule() {
|
||||
if ( inProgress ) {
|
||||
if ( document.hidden === false && window.requestAnimationFrame ) {
|
||||
window.requestAnimationFrame( schedule );
|
||||
} else {
|
||||
window.setTimeout( schedule, jQuery.fx.interval );
|
||||
}
|
||||
|
||||
jQuery.fx.tick();
|
||||
}
|
||||
}
|
||||
@@ -6977,7 +7006,7 @@ function propFilter( props, specialEasing ) {
|
||||
name = jQuery.camelCase( index );
|
||||
easing = specialEasing[ name ];
|
||||
value = props[ index ];
|
||||
if ( jQuery.isArray( value ) ) {
|
||||
if ( Array.isArray( value ) ) {
|
||||
easing = value[ 1 ];
|
||||
value = props[ index ] = value[ 0 ];
|
||||
}
|
||||
@@ -7036,12 +7065,19 @@ function Animation( elem, properties, options ) {
|
||||
|
||||
deferred.notifyWith( elem, [ animation, percent, remaining ] );
|
||||
|
||||
// If there's more to do, yield
|
||||
if ( percent < 1 && length ) {
|
||||
return remaining;
|
||||
} else {
|
||||
deferred.resolveWith( elem, [ animation ] );
|
||||
return false;
|
||||
}
|
||||
|
||||
// If this was an empty animation, synthesize a final progress notification
|
||||
if ( !length ) {
|
||||
deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
||||
}
|
||||
|
||||
// Resolve the animation and report its conclusion
|
||||
deferred.resolveWith( elem, [ animation ] );
|
||||
return false;
|
||||
},
|
||||
animation = deferred.promise( {
|
||||
elem: elem,
|
||||
@@ -7106,6 +7142,13 @@ function Animation( elem, properties, options ) {
|
||||
animation.opts.start.call( elem, animation );
|
||||
}
|
||||
|
||||
// Attach callbacks from options
|
||||
animation
|
||||
.progress( animation.opts.progress )
|
||||
.done( animation.opts.done, animation.opts.complete )
|
||||
.fail( animation.opts.fail )
|
||||
.always( animation.opts.always );
|
||||
|
||||
jQuery.fx.timer(
|
||||
jQuery.extend( tick, {
|
||||
elem: elem,
|
||||
@@ -7114,11 +7157,7 @@ function Animation( elem, properties, options ) {
|
||||
} )
|
||||
);
|
||||
|
||||
// attach callbacks from options
|
||||
return animation.progress( animation.opts.progress )
|
||||
.done( animation.opts.done, animation.opts.complete )
|
||||
.fail( animation.opts.fail )
|
||||
.always( animation.opts.always );
|
||||
return animation;
|
||||
}
|
||||
|
||||
jQuery.Animation = jQuery.extend( Animation, {
|
||||
@@ -7169,8 +7208,8 @@ jQuery.speed = function( speed, easing, fn ) {
|
||||
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
|
||||
};
|
||||
|
||||
// Go to the end state if fx are off or if document is hidden
|
||||
if ( jQuery.fx.off || document.hidden ) {
|
||||
// Go to the end state if fx are off
|
||||
if ( jQuery.fx.off ) {
|
||||
opt.duration = 0;
|
||||
|
||||
} else {
|
||||
@@ -7362,7 +7401,7 @@ jQuery.fx.tick = function() {
|
||||
for ( ; i < timers.length; i++ ) {
|
||||
timer = timers[ i ];
|
||||
|
||||
// Checks the timer has not already been removed
|
||||
// Run the timer and safely remove it when done (allowing for external removal)
|
||||
if ( !timer() && timers[ i ] === timer ) {
|
||||
timers.splice( i--, 1 );
|
||||
}
|
||||
@@ -7376,30 +7415,21 @@ jQuery.fx.tick = function() {
|
||||
|
||||
jQuery.fx.timer = function( timer ) {
|
||||
jQuery.timers.push( timer );
|
||||
if ( timer() ) {
|
||||
jQuery.fx.start();
|
||||
} else {
|
||||
jQuery.timers.pop();
|
||||
}
|
||||
jQuery.fx.start();
|
||||
};
|
||||
|
||||
jQuery.fx.interval = 13;
|
||||
jQuery.fx.start = function() {
|
||||
if ( !timerId ) {
|
||||
timerId = window.requestAnimationFrame ?
|
||||
window.requestAnimationFrame( raf ) :
|
||||
window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
|
||||
if ( inProgress ) {
|
||||
return;
|
||||
}
|
||||
|
||||
inProgress = true;
|
||||
schedule();
|
||||
};
|
||||
|
||||
jQuery.fx.stop = function() {
|
||||
if ( window.cancelAnimationFrame ) {
|
||||
window.cancelAnimationFrame( timerId );
|
||||
} else {
|
||||
window.clearInterval( timerId );
|
||||
}
|
||||
|
||||
timerId = null;
|
||||
inProgress = null;
|
||||
};
|
||||
|
||||
jQuery.fx.speeds = {
|
||||
@@ -7516,7 +7546,7 @@ jQuery.extend( {
|
||||
type: {
|
||||
set: function( elem, value ) {
|
||||
if ( !support.radioValue && value === "radio" &&
|
||||
jQuery.nodeName( elem, "input" ) ) {
|
||||
nodeName( elem, "input" ) ) {
|
||||
var val = elem.value;
|
||||
elem.setAttribute( "type", value );
|
||||
if ( val ) {
|
||||
@@ -7947,7 +7977,7 @@ jQuery.fn.extend( {
|
||||
} else if ( typeof val === "number" ) {
|
||||
val += "";
|
||||
|
||||
} else if ( jQuery.isArray( val ) ) {
|
||||
} else if ( Array.isArray( val ) ) {
|
||||
val = jQuery.map( val, function( value ) {
|
||||
return value == null ? "" : value + "";
|
||||
} );
|
||||
@@ -8006,7 +8036,7 @@ jQuery.extend( {
|
||||
// Don't return options that are disabled or in a disabled optgroup
|
||||
!option.disabled &&
|
||||
( !option.parentNode.disabled ||
|
||||
!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
!nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
|
||||
// Get the specific value for the option
|
||||
value = jQuery( option ).val();
|
||||
@@ -8058,7 +8088,7 @@ jQuery.extend( {
|
||||
jQuery.each( [ "radio", "checkbox" ], function() {
|
||||
jQuery.valHooks[ this ] = {
|
||||
set: function( elem, value ) {
|
||||
if ( jQuery.isArray( value ) ) {
|
||||
if ( Array.isArray( value ) ) {
|
||||
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
||||
}
|
||||
}
|
||||
@@ -8353,7 +8383,7 @@ var
|
||||
function buildParams( prefix, obj, traditional, add ) {
|
||||
var name;
|
||||
|
||||
if ( jQuery.isArray( obj ) ) {
|
||||
if ( Array.isArray( obj ) ) {
|
||||
|
||||
// Serialize array item.
|
||||
jQuery.each( obj, function( i, v ) {
|
||||
@@ -8405,7 +8435,7 @@ jQuery.param = function( a, traditional ) {
|
||||
};
|
||||
|
||||
// If an array was passed in, assume that it is an array of form elements.
|
||||
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
||||
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
||||
|
||||
// Serialize the form elements
|
||||
jQuery.each( a, function() {
|
||||
@@ -8451,7 +8481,7 @@ jQuery.fn.extend( {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( jQuery.isArray( val ) ) {
|
||||
if ( Array.isArray( val ) ) {
|
||||
return jQuery.map( val, function( val ) {
|
||||
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
||||
} );
|
||||
@@ -9876,13 +9906,6 @@ jQuery.expr.pseudos.animated = function( elem ) {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets a window from an element
|
||||
*/
|
||||
function getWindow( elem ) {
|
||||
return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
|
||||
}
|
||||
|
||||
jQuery.offset = {
|
||||
setOffset: function( elem, options, i ) {
|
||||
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
||||
@@ -9947,13 +9970,14 @@ jQuery.fn.extend( {
|
||||
} );
|
||||
}
|
||||
|
||||
var docElem, win, rect, doc,
|
||||
var doc, docElem, rect, win,
|
||||
elem = this[ 0 ];
|
||||
|
||||
if ( !elem ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a
|
||||
// disconnected node in IE throws an error
|
||||
@@ -9963,20 +9987,14 @@ jQuery.fn.extend( {
|
||||
|
||||
rect = elem.getBoundingClientRect();
|
||||
|
||||
// Make sure element is not hidden (display: none)
|
||||
if ( rect.width || rect.height ) {
|
||||
doc = elem.ownerDocument;
|
||||
win = getWindow( doc );
|
||||
docElem = doc.documentElement;
|
||||
doc = elem.ownerDocument;
|
||||
docElem = doc.documentElement;
|
||||
win = doc.defaultView;
|
||||
|
||||
return {
|
||||
top: rect.top + win.pageYOffset - docElem.clientTop,
|
||||
left: rect.left + win.pageXOffset - docElem.clientLeft
|
||||
};
|
||||
}
|
||||
|
||||
// Return zeros for disconnected and hidden elements (gh-2310)
|
||||
return rect;
|
||||
return {
|
||||
top: rect.top + win.pageYOffset - docElem.clientTop,
|
||||
left: rect.left + win.pageXOffset - docElem.clientLeft
|
||||
};
|
||||
},
|
||||
|
||||
position: function() {
|
||||
@@ -10002,7 +10020,7 @@ jQuery.fn.extend( {
|
||||
|
||||
// Get correct offsets
|
||||
offset = this.offset();
|
||||
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
|
||||
if ( !nodeName( offsetParent[ 0 ], "html" ) ) {
|
||||
parentOffset = offsetParent.offset();
|
||||
}
|
||||
|
||||
@@ -10049,7 +10067,14 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(
|
||||
|
||||
jQuery.fn[ method ] = function( val ) {
|
||||
return access( this, function( elem, method, val ) {
|
||||
var win = getWindow( elem );
|
||||
|
||||
// Coalesce documents and windows
|
||||
var win;
|
||||
if ( jQuery.isWindow( elem ) ) {
|
||||
win = elem;
|
||||
} else if ( elem.nodeType === 9 ) {
|
||||
win = elem.defaultView;
|
||||
}
|
||||
|
||||
if ( val === undefined ) {
|
||||
return win ? win[ prop ] : elem[ method ];
|
||||
@@ -10158,7 +10183,16 @@ jQuery.fn.extend( {
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.holdReady = function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
};
|
||||
jQuery.isArray = Array.isArray;
|
||||
jQuery.parseJSON = JSON.parse;
|
||||
jQuery.nodeName = nodeName;
|
||||
|
||||
|
||||
|
||||
@@ -10215,6 +10249,5 @@ if ( !noGlobal ) {
|
||||
|
||||
|
||||
|
||||
|
||||
return jQuery;
|
||||
} );
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+161
-108
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.1.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/animatedSelector,-effects/Tween,-deprecated
|
||||
* jQuery JavaScript Library v3.2.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2016-09-22T22:30Z
|
||||
* Date: 2017-03-20T19:00Z
|
||||
*/
|
||||
( function( global, factory ) {
|
||||
|
||||
@@ -88,7 +88,7 @@ var support = {};
|
||||
|
||||
|
||||
var
|
||||
version = "3.1.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/animatedSelector,-effects/Tween,-deprecated",
|
||||
version = "3.2.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
@@ -236,11 +236,11 @@ jQuery.extend = jQuery.fn.extend = function() {
|
||||
|
||||
// Recurse if we're merging plain objects or arrays
|
||||
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
||||
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
||||
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
||||
|
||||
if ( copyIsArray ) {
|
||||
copyIsArray = false;
|
||||
clone = src && jQuery.isArray( src ) ? src : [];
|
||||
clone = src && Array.isArray( src ) ? src : [];
|
||||
|
||||
} else {
|
||||
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
||||
@@ -279,8 +279,6 @@ jQuery.extend( {
|
||||
return jQuery.type( obj ) === "function";
|
||||
},
|
||||
|
||||
isArray: Array.isArray,
|
||||
|
||||
isWindow: function( obj ) {
|
||||
return obj != null && obj === obj.window;
|
||||
},
|
||||
@@ -355,10 +353,6 @@ jQuery.extend( {
|
||||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
||||
},
|
||||
|
||||
nodeName: function( elem, name ) {
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
},
|
||||
|
||||
each: function( obj, callback ) {
|
||||
var length, i = 0;
|
||||
|
||||
@@ -2843,6 +2837,13 @@ var siblings = function( n, elem ) {
|
||||
|
||||
var rneedsContext = jQuery.expr.match.needsContext;
|
||||
|
||||
|
||||
|
||||
function nodeName( elem, name ) {
|
||||
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
|
||||
};
|
||||
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||
|
||||
|
||||
@@ -3194,7 +3195,18 @@ jQuery.each( {
|
||||
return siblings( elem.firstChild );
|
||||
},
|
||||
contents: function( elem ) {
|
||||
return elem.contentDocument || jQuery.merge( [], elem.childNodes );
|
||||
if ( nodeName( elem, "iframe" ) ) {
|
||||
return elem.contentDocument;
|
||||
}
|
||||
|
||||
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
|
||||
// Treat the template element as a regular one in browsers that
|
||||
// don't support it.
|
||||
if ( nodeName( elem, "template" ) ) {
|
||||
elem = elem.content || elem;
|
||||
}
|
||||
|
||||
return jQuery.merge( [], elem.childNodes );
|
||||
}
|
||||
}, function( name, fn ) {
|
||||
jQuery.fn[ name ] = function( until, selector ) {
|
||||
@@ -3292,7 +3304,7 @@ jQuery.Callbacks = function( options ) {
|
||||
fire = function() {
|
||||
|
||||
// Enforce single-firing
|
||||
locked = options.once;
|
||||
locked = locked || options.once;
|
||||
|
||||
// Execute callbacks for all pending executions,
|
||||
// respecting firingIndex overrides and runtime changes
|
||||
@@ -3461,7 +3473,7 @@ function Thrower( ex ) {
|
||||
throw ex;
|
||||
}
|
||||
|
||||
function adoptValue( value, resolve, reject ) {
|
||||
function adoptValue( value, resolve, reject, noValue ) {
|
||||
var method;
|
||||
|
||||
try {
|
||||
@@ -3477,9 +3489,10 @@ function adoptValue( value, resolve, reject ) {
|
||||
// Other non-thenables
|
||||
} else {
|
||||
|
||||
// Support: Android 4.0 only
|
||||
// Strict mode functions invoked without .call/.apply get global-object context
|
||||
resolve.call( undefined, value );
|
||||
// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
|
||||
// * false: [ value ].slice( 0 ) => resolve( value )
|
||||
// * true: [ value ].slice( 1 ) => resolve()
|
||||
resolve.apply( undefined, [ value ].slice( noValue ) );
|
||||
}
|
||||
|
||||
// For Promises/A+, convert exceptions into rejections
|
||||
@@ -3489,7 +3502,7 @@ function adoptValue( value, resolve, reject ) {
|
||||
|
||||
// Support: Android 4.0 only
|
||||
// Strict mode functions invoked without .call/.apply get global-object context
|
||||
reject.call( undefined, value );
|
||||
reject.apply( undefined, [ value ] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3814,7 +3827,8 @@ jQuery.extend( {
|
||||
|
||||
// Single- and empty arguments are adopted like Promise.resolve
|
||||
if ( remaining <= 1 ) {
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
||||
!remaining );
|
||||
|
||||
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
||||
if ( master.state() === "pending" ||
|
||||
@@ -3886,15 +3900,6 @@ jQuery.extend( {
|
||||
// the ready event fires. See #6781
|
||||
readyWait: 1,
|
||||
|
||||
// Hold (or release) the ready event
|
||||
holdReady: function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
},
|
||||
|
||||
// Handle when the DOM is ready
|
||||
ready: function( wait ) {
|
||||
|
||||
@@ -4130,7 +4135,7 @@ Data.prototype = {
|
||||
if ( key !== undefined ) {
|
||||
|
||||
// Support array or space separated string of keys
|
||||
if ( jQuery.isArray( key ) ) {
|
||||
if ( Array.isArray( key ) ) {
|
||||
|
||||
// If key is an array of keys...
|
||||
// We always set camelCase keys, so remove that.
|
||||
@@ -4356,7 +4361,7 @@ jQuery.extend( {
|
||||
|
||||
// Speed up dequeue by getting out quickly if this is just a lookup
|
||||
if ( data ) {
|
||||
if ( !queue || jQuery.isArray( data ) ) {
|
||||
if ( !queue || Array.isArray( data ) ) {
|
||||
queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
|
||||
} else {
|
||||
queue.push( data );
|
||||
@@ -4733,7 +4738,7 @@ function getAll( context, tag ) {
|
||||
ret = [];
|
||||
}
|
||||
|
||||
if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {
|
||||
if ( tag === undefined || tag && nodeName( context, tag ) ) {
|
||||
return jQuery.merge( [ context ], ret );
|
||||
}
|
||||
|
||||
@@ -5340,7 +5345,7 @@ jQuery.event = {
|
||||
|
||||
// For checkbox, fire native event so checked state will be right
|
||||
trigger: function() {
|
||||
if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
|
||||
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
|
||||
this.click();
|
||||
return false;
|
||||
}
|
||||
@@ -5348,7 +5353,7 @@ jQuery.event = {
|
||||
|
||||
// For cross-browser consistency, don't fire native .click() on links
|
||||
_default: function( event ) {
|
||||
return jQuery.nodeName( event.target, "a" );
|
||||
return nodeName( event.target, "a" );
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5625,11 +5630,12 @@ var
|
||||
rscriptTypeMasked = /^true\/(.*)/,
|
||||
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
||||
|
||||
// Prefer a tbody over its parent table for containing new rows
|
||||
function manipulationTarget( elem, content ) {
|
||||
if ( jQuery.nodeName( elem, "table" ) &&
|
||||
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
||||
if ( nodeName( elem, "table" ) &&
|
||||
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
||||
|
||||
return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
|
||||
return jQuery( ">tbody", elem )[ 0 ] || elem;
|
||||
}
|
||||
|
||||
return elem;
|
||||
@@ -6159,12 +6165,18 @@ var getStyles = function( elem ) {
|
||||
|
||||
function curCSS( elem, name, computed ) {
|
||||
var width, minWidth, maxWidth, ret,
|
||||
|
||||
// Support: Firefox 51+
|
||||
// Retrieving style before computed somehow
|
||||
// fixes an issue with getting wrong values
|
||||
// on detached elements
|
||||
style = elem.style;
|
||||
|
||||
computed = computed || getStyles( elem );
|
||||
|
||||
// Support: IE <=9 only
|
||||
// getPropertyValue is only needed for .css('filter') (#12537)
|
||||
// getPropertyValue is needed for:
|
||||
// .css('filter') (IE 9 only, #12537)
|
||||
// .css('--customProperty) (#3144)
|
||||
if ( computed ) {
|
||||
ret = computed.getPropertyValue( name ) || computed[ name ];
|
||||
|
||||
@@ -6230,6 +6242,7 @@ var
|
||||
// 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]).+)/,
|
||||
rcustomProp = /^--/,
|
||||
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
||||
cssNormalTransform = {
|
||||
letterSpacing: "0",
|
||||
@@ -6259,6 +6272,16 @@ function vendorPropName( name ) {
|
||||
}
|
||||
}
|
||||
|
||||
// Return a property mapped along what jQuery.cssProps suggests or to
|
||||
// a vendor prefixed property.
|
||||
function finalPropName( name ) {
|
||||
var ret = jQuery.cssProps[ name ];
|
||||
if ( !ret ) {
|
||||
ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function setPositiveNumber( elem, value, subtract ) {
|
||||
|
||||
// Any relative (+/-) values have already been
|
||||
@@ -6319,44 +6342,31 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
||||
|
||||
function getWidthOrHeight( elem, name, extra ) {
|
||||
|
||||
// Start with offset property, which is equivalent to the border-box value
|
||||
var val,
|
||||
valueIsBorderBox = true,
|
||||
// Start with computed style
|
||||
var valueIsBorderBox,
|
||||
styles = getStyles( elem ),
|
||||
val = curCSS( elem, name, styles ),
|
||||
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a disconnected node
|
||||
// in IE throws an error.
|
||||
if ( elem.getClientRects().length ) {
|
||||
val = elem.getBoundingClientRect()[ name ];
|
||||
// Computed unit is not pixels. Stop here and return.
|
||||
if ( rnumnonpx.test( val ) ) {
|
||||
return val;
|
||||
}
|
||||
|
||||
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
||||
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
||||
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
||||
if ( val <= 0 || val == null ) {
|
||||
// Check for style in case a browser which returns unreliable values
|
||||
// for getComputedStyle silently falls back to the reliable elem.style
|
||||
valueIsBorderBox = isBorderBox &&
|
||||
( support.boxSizingReliable() || val === elem.style[ name ] );
|
||||
|
||||
// Fall back to computed then uncomputed css if necessary
|
||||
val = curCSS( elem, name, styles );
|
||||
if ( val < 0 || val == null ) {
|
||||
val = elem.style[ name ];
|
||||
}
|
||||
|
||||
// Computed unit is not pixels. Stop here and return.
|
||||
if ( rnumnonpx.test( val ) ) {
|
||||
return val;
|
||||
}
|
||||
|
||||
// Check for style in case a browser which returns unreliable values
|
||||
// for getComputedStyle silently falls back to the reliable elem.style
|
||||
valueIsBorderBox = isBorderBox &&
|
||||
( support.boxSizingReliable() || val === elem.style[ name ] );
|
||||
|
||||
// Normalize "", auto, and prepare for extra
|
||||
val = parseFloat( val ) || 0;
|
||||
// Fall back to offsetWidth/Height when value is "auto"
|
||||
// This happens for inline elements with no explicit setting (gh-3571)
|
||||
if ( val === "auto" ) {
|
||||
val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ];
|
||||
}
|
||||
|
||||
// Normalize "", auto, and prepare for extra
|
||||
val = parseFloat( val ) || 0;
|
||||
|
||||
// Use the active box-sizing model to add/subtract irrelevant styles
|
||||
return ( val +
|
||||
augmentWidthOrHeight(
|
||||
@@ -6420,10 +6430,15 @@ jQuery.extend( {
|
||||
// Make sure that we're working with the right name
|
||||
var ret, type, hooks,
|
||||
origName = jQuery.camelCase( name ),
|
||||
isCustomProp = rcustomProp.test( name ),
|
||||
style = elem.style;
|
||||
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
// Make sure that we're working with the right name. We don't
|
||||
// want to query the value if it is a CSS custom property
|
||||
// since they are user-defined.
|
||||
if ( !isCustomProp ) {
|
||||
name = finalPropName( origName );
|
||||
}
|
||||
|
||||
// Gets hook for the prefixed version, then unprefixed version
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
@@ -6459,7 +6474,11 @@ jQuery.extend( {
|
||||
if ( !hooks || !( "set" in hooks ) ||
|
||||
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
||||
|
||||
style[ name ] = value;
|
||||
if ( isCustomProp ) {
|
||||
style.setProperty( name, value );
|
||||
} else {
|
||||
style[ name ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -6478,11 +6497,15 @@ jQuery.extend( {
|
||||
|
||||
css: function( elem, name, extra, styles ) {
|
||||
var val, num, hooks,
|
||||
origName = jQuery.camelCase( name );
|
||||
origName = jQuery.camelCase( name ),
|
||||
isCustomProp = rcustomProp.test( name );
|
||||
|
||||
// Make sure that we're working with the right name
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
// Make sure that we're working with the right name. We don't
|
||||
// want to modify the value if it is a CSS custom property
|
||||
// since they are user-defined.
|
||||
if ( !isCustomProp ) {
|
||||
name = finalPropName( origName );
|
||||
}
|
||||
|
||||
// Try prefixed name followed by the unprefixed name
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
@@ -6507,6 +6530,7 @@ jQuery.extend( {
|
||||
num = parseFloat( val );
|
||||
return extra === true || isFinite( num ) ? num || 0 : val;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
} );
|
||||
@@ -6606,7 +6630,7 @@ jQuery.fn.extend( {
|
||||
map = {},
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isArray( name ) ) {
|
||||
if ( Array.isArray( name ) ) {
|
||||
styles = getStyles( elem );
|
||||
len = name.length;
|
||||
|
||||
@@ -6730,7 +6754,7 @@ jQuery.extend( {
|
||||
type: {
|
||||
set: function( elem, value ) {
|
||||
if ( !support.radioValue && value === "radio" &&
|
||||
jQuery.nodeName( elem, "input" ) ) {
|
||||
nodeName( elem, "input" ) ) {
|
||||
var val = elem.value;
|
||||
elem.setAttribute( "type", value );
|
||||
if ( val ) {
|
||||
@@ -7161,7 +7185,7 @@ jQuery.fn.extend( {
|
||||
} else if ( typeof val === "number" ) {
|
||||
val += "";
|
||||
|
||||
} else if ( jQuery.isArray( val ) ) {
|
||||
} else if ( Array.isArray( val ) ) {
|
||||
val = jQuery.map( val, function( value ) {
|
||||
return value == null ? "" : value + "";
|
||||
} );
|
||||
@@ -7220,7 +7244,7 @@ jQuery.extend( {
|
||||
// Don't return options that are disabled or in a disabled optgroup
|
||||
!option.disabled &&
|
||||
( !option.parentNode.disabled ||
|
||||
!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
!nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
|
||||
// Get the specific value for the option
|
||||
value = jQuery( option ).val();
|
||||
@@ -7272,7 +7296,7 @@ jQuery.extend( {
|
||||
jQuery.each( [ "radio", "checkbox" ], function() {
|
||||
jQuery.valHooks[ this ] = {
|
||||
set: function( elem, value ) {
|
||||
if ( jQuery.isArray( value ) ) {
|
||||
if ( Array.isArray( value ) ) {
|
||||
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
||||
}
|
||||
}
|
||||
@@ -7539,7 +7563,7 @@ var
|
||||
function buildParams( prefix, obj, traditional, add ) {
|
||||
var name;
|
||||
|
||||
if ( jQuery.isArray( obj ) ) {
|
||||
if ( Array.isArray( obj ) ) {
|
||||
|
||||
// Serialize array item.
|
||||
jQuery.each( obj, function( i, v ) {
|
||||
@@ -7591,7 +7615,7 @@ jQuery.param = function( a, traditional ) {
|
||||
};
|
||||
|
||||
// If an array was passed in, assume that it is an array of form elements.
|
||||
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
||||
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
||||
|
||||
// Serialize the form elements
|
||||
jQuery.each( a, function() {
|
||||
@@ -7637,7 +7661,7 @@ jQuery.fn.extend( {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( jQuery.isArray( val ) ) {
|
||||
if ( Array.isArray( val ) ) {
|
||||
return jQuery.map( val, function( val ) {
|
||||
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
||||
} );
|
||||
@@ -7789,13 +7813,6 @@ jQuery.parseHTML = function( data, context, keepScripts ) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Gets a window from an element
|
||||
*/
|
||||
function getWindow( elem ) {
|
||||
return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
|
||||
}
|
||||
|
||||
jQuery.offset = {
|
||||
setOffset: function( elem, options, i ) {
|
||||
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
||||
@@ -7860,13 +7877,14 @@ jQuery.fn.extend( {
|
||||
} );
|
||||
}
|
||||
|
||||
var docElem, win, rect, doc,
|
||||
var doc, docElem, rect, win,
|
||||
elem = this[ 0 ];
|
||||
|
||||
if ( !elem ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a
|
||||
// disconnected node in IE throws an error
|
||||
@@ -7876,20 +7894,14 @@ jQuery.fn.extend( {
|
||||
|
||||
rect = elem.getBoundingClientRect();
|
||||
|
||||
// Make sure element is not hidden (display: none)
|
||||
if ( rect.width || rect.height ) {
|
||||
doc = elem.ownerDocument;
|
||||
win = getWindow( doc );
|
||||
docElem = doc.documentElement;
|
||||
doc = elem.ownerDocument;
|
||||
docElem = doc.documentElement;
|
||||
win = doc.defaultView;
|
||||
|
||||
return {
|
||||
top: rect.top + win.pageYOffset - docElem.clientTop,
|
||||
left: rect.left + win.pageXOffset - docElem.clientLeft
|
||||
};
|
||||
}
|
||||
|
||||
// Return zeros for disconnected and hidden elements (gh-2310)
|
||||
return rect;
|
||||
return {
|
||||
top: rect.top + win.pageYOffset - docElem.clientTop,
|
||||
left: rect.left + win.pageXOffset - docElem.clientLeft
|
||||
};
|
||||
},
|
||||
|
||||
position: function() {
|
||||
@@ -7915,7 +7927,7 @@ jQuery.fn.extend( {
|
||||
|
||||
// Get correct offsets
|
||||
offset = this.offset();
|
||||
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
|
||||
if ( !nodeName( offsetParent[ 0 ], "html" ) ) {
|
||||
parentOffset = offsetParent.offset();
|
||||
}
|
||||
|
||||
@@ -7962,7 +7974,14 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(
|
||||
|
||||
jQuery.fn[ method ] = function( val ) {
|
||||
return access( this, function( elem, method, val ) {
|
||||
var win = getWindow( elem );
|
||||
|
||||
// Coalesce documents and windows
|
||||
var win;
|
||||
if ( jQuery.isWindow( elem ) ) {
|
||||
win = elem;
|
||||
} else if ( elem.nodeType === 9 ) {
|
||||
win = elem.defaultView;
|
||||
}
|
||||
|
||||
if ( val === undefined ) {
|
||||
return win ? win[ prop ] : elem[ method ];
|
||||
@@ -8050,6 +8069,41 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
||||
} );
|
||||
|
||||
|
||||
jQuery.fn.extend( {
|
||||
|
||||
bind: function( types, data, fn ) {
|
||||
return this.on( types, null, data, fn );
|
||||
},
|
||||
unbind: function( types, fn ) {
|
||||
return this.off( types, null, fn );
|
||||
},
|
||||
|
||||
delegate: function( selector, types, data, fn ) {
|
||||
return this.on( types, selector, data, fn );
|
||||
},
|
||||
undelegate: function( selector, types, fn ) {
|
||||
|
||||
// ( namespace ) or ( selector, types [, fn] )
|
||||
return arguments.length === 1 ?
|
||||
this.off( selector, "**" ) :
|
||||
this.off( types, selector || "**", fn );
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.holdReady = function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
};
|
||||
jQuery.isArray = Array.isArray;
|
||||
jQuery.parseJSON = JSON.parse;
|
||||
jQuery.nodeName = nodeName;
|
||||
|
||||
|
||||
|
||||
|
||||
// Register as a named AMD module, since jQuery can be concatenated with other
|
||||
// files that may use define, but not via a proper concatenation script that
|
||||
// understands anonymous AMD modules. A named AMD is safest and most robust
|
||||
@@ -8102,6 +8156,5 @@ if ( !noGlobal ) {
|
||||
|
||||
|
||||
|
||||
|
||||
return jQuery;
|
||||
} );
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+19
-19
@@ -14,19 +14,19 @@
|
||||
]
|
||||
],
|
||||
"_from": "jquery@>=3.1.1 <4.0.0",
|
||||
"_id": "jquery@3.1.1",
|
||||
"_id": "jquery@3.2.1",
|
||||
"_inCache": true,
|
||||
"_location": "/jquery",
|
||||
"_nodeVersion": "6.6.0",
|
||||
"_nodeVersion": "7.7.3",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/jquery-3.1.1.tgz_1474583566957_0.15473420196212828"
|
||||
"tmp": "tmp/jquery-3.2.1.tgz_1490036530067_0.19497186387889087"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "timmywil",
|
||||
"email": "4timmywil@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.10.3",
|
||||
"_npmVersion": "4.4.4",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "jquery@^3.1.1",
|
||||
@@ -41,14 +41,14 @@
|
||||
"/",
|
||||
"/jquery.scrollto"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/jquery/-/jquery-3.1.1.tgz",
|
||||
"_shasum": "347c1c21c7e004115e0a4da32cece041fad3c8a3",
|
||||
"_resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
|
||||
"_shasum": "5c4d9de652af6cd0a770154a631bba12b015c787",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "jquery@^3.1.1",
|
||||
"_where": "/brodocs",
|
||||
"author": {
|
||||
"name": "jQuery Foundation and other contributors",
|
||||
"url": "https://github.com/jquery/jquery/blob/3.1.1/AUTHORS.txt"
|
||||
"name": "JS Foundation and other contributors",
|
||||
"url": "https://github.com/jquery/jquery/blob/3.2.1/AUTHORS.txt"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jquery/jquery/issues"
|
||||
@@ -80,8 +80,8 @@
|
||||
"Traversing",
|
||||
"Wrap"
|
||||
],
|
||||
"markerPattern": "^((clos|fix|resolv)(e[sd]|ing))|(refs?)",
|
||||
"ticketPattern": "^((Closes|Fixes) ([a-zA-Z]{2,}-)[0-9]+)|(Refs? [^#])"
|
||||
"markerPattern": "^((clos|fix|resolv)(e[sd]|ing))|^(refs?)",
|
||||
"ticketPattern": "^((Closes|Fixes) ([a-zA-Z]{2,}-)[0-9]+)|^(Refs? [^#])"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "JavaScript library for DOM operations",
|
||||
@@ -120,10 +120,10 @@
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "347c1c21c7e004115e0a4da32cece041fad3c8a3",
|
||||
"tarball": "https://registry.npmjs.org/jquery/-/jquery-3.1.1.tgz"
|
||||
"shasum": "5c4d9de652af6cd0a770154a631bba12b015c787",
|
||||
"tarball": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz"
|
||||
},
|
||||
"gitHead": "1b30f3ad466ebf2714d47eda34dbd7fdf6849fe3",
|
||||
"gitHead": "77d2a51d0520d2ee44173afdf4e40a9201f5964e",
|
||||
"homepage": "https://jquery.com",
|
||||
"keywords": [
|
||||
"jquery",
|
||||
@@ -138,17 +138,17 @@
|
||||
"name": "dmethvin",
|
||||
"email": "dave.methvin@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "mgol",
|
||||
"email": "m.goleb@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "scott.gonzalez",
|
||||
"email": "scott.gonzalez@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "m_gol",
|
||||
"email": "m.goleb@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "timmywil",
|
||||
"email": "timmywillisn@gmail.com"
|
||||
"email": "4timmywil@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "jquery",
|
||||
@@ -166,5 +166,5 @@
|
||||
"test": "grunt && grunt test:slow"
|
||||
},
|
||||
"title": "jQuery",
|
||||
"version": "3.1.1"
|
||||
"version": "3.2.1"
|
||||
}
|
||||
|
||||
+3
-16
@@ -1,18 +1,5 @@
|
||||
{
|
||||
// Support: IE <=9 only, Android <=4.0 only
|
||||
// The above browsers are failing a lot of tests in the ES5
|
||||
// test suite at http://test262.ecmascript.org.
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 3
|
||||
},
|
||||
"globals": {
|
||||
"window": true,
|
||||
"jQuery": true,
|
||||
"define": true,
|
||||
"module": true,
|
||||
"noGlobal": true
|
||||
},
|
||||
"rules": {
|
||||
"strict": ["error", "function"]
|
||||
}
|
||||
"root": true,
|
||||
|
||||
"extends": "../.eslintrc-browser.json"
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../core/access",
|
||||
"../core/nodeName",
|
||||
"./support",
|
||||
"../var/rnothtmlwhite",
|
||||
"../selector"
|
||||
], function( jQuery, access, support, rnothtmlwhite ) {
|
||||
], function( jQuery, access, nodeName, support, rnothtmlwhite ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -74,7 +75,7 @@ jQuery.extend( {
|
||||
type: {
|
||||
set: function( elem, value ) {
|
||||
if ( !support.radioValue && value === "radio" &&
|
||||
jQuery.nodeName( elem, "input" ) ) {
|
||||
nodeName( elem, "input" ) ) {
|
||||
var val = elem.value;
|
||||
elem.setAttribute( "type", value );
|
||||
if ( val ) {
|
||||
|
||||
+6
-4
@@ -2,8 +2,10 @@ define( [
|
||||
"../core",
|
||||
"../core/stripAndCollapse",
|
||||
"./support",
|
||||
"../core/nodeName",
|
||||
|
||||
"../core/init"
|
||||
], function( jQuery, stripAndCollapse, support ) {
|
||||
], function( jQuery, stripAndCollapse, support, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -62,7 +64,7 @@ jQuery.fn.extend( {
|
||||
} else if ( typeof val === "number" ) {
|
||||
val += "";
|
||||
|
||||
} else if ( jQuery.isArray( val ) ) {
|
||||
} else if ( Array.isArray( val ) ) {
|
||||
val = jQuery.map( val, function( value ) {
|
||||
return value == null ? "" : value + "";
|
||||
} );
|
||||
@@ -121,7 +123,7 @@ jQuery.extend( {
|
||||
// Don't return options that are disabled or in a disabled optgroup
|
||||
!option.disabled &&
|
||||
( !option.parentNode.disabled ||
|
||||
!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
!nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
|
||||
// Get the specific value for the option
|
||||
value = jQuery( option ).val();
|
||||
@@ -173,7 +175,7 @@ jQuery.extend( {
|
||||
jQuery.each( [ "radio", "checkbox" ], function() {
|
||||
jQuery.valHooks[ this ] = {
|
||||
set: function( elem, value ) {
|
||||
if ( jQuery.isArray( value ) ) {
|
||||
if ( Array.isArray( value ) ) {
|
||||
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ jQuery.Callbacks = function( options ) {
|
||||
fire = function() {
|
||||
|
||||
// Enforce single-firing
|
||||
locked = options.once;
|
||||
locked = locked || options.once;
|
||||
|
||||
// Execute callbacks for all pending executions,
|
||||
// respecting firingIndex overrides and runtime changes
|
||||
|
||||
+3
-9
@@ -24,7 +24,7 @@ define( [
|
||||
"use strict";
|
||||
|
||||
var
|
||||
version = "3.1.1",
|
||||
version = "3.2.1",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
@@ -172,11 +172,11 @@ jQuery.extend = jQuery.fn.extend = function() {
|
||||
|
||||
// Recurse if we're merging plain objects or arrays
|
||||
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
||||
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
||||
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
||||
|
||||
if ( copyIsArray ) {
|
||||
copyIsArray = false;
|
||||
clone = src && jQuery.isArray( src ) ? src : [];
|
||||
clone = src && Array.isArray( src ) ? src : [];
|
||||
|
||||
} else {
|
||||
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
||||
@@ -215,8 +215,6 @@ jQuery.extend( {
|
||||
return jQuery.type( obj ) === "function";
|
||||
},
|
||||
|
||||
isArray: Array.isArray,
|
||||
|
||||
isWindow: function( obj ) {
|
||||
return obj != null && obj === obj.window;
|
||||
},
|
||||
@@ -291,10 +289,6 @@ jQuery.extend( {
|
||||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
||||
},
|
||||
|
||||
nodeName: function( elem, name ) {
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
},
|
||||
|
||||
each: function( obj, callback ) {
|
||||
var length, i = 0;
|
||||
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ define( [
|
||||
"../core",
|
||||
"../var/document",
|
||||
"./var/rsingleTag",
|
||||
|
||||
"../traversing/findFilter"
|
||||
], function( jQuery, document, rsingleTag ) {
|
||||
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
define( function() {
|
||||
|
||||
"use strict";
|
||||
|
||||
function nodeName( elem, name ) {
|
||||
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
|
||||
};
|
||||
|
||||
return nodeName;
|
||||
|
||||
} );
|
||||
-9
@@ -32,15 +32,6 @@ jQuery.extend( {
|
||||
// the ready event fires. See #6781
|
||||
readyWait: 1,
|
||||
|
||||
// Hold (or release) the ready event
|
||||
holdReady: function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
},
|
||||
|
||||
ready: function( wait ) {
|
||||
|
||||
// Abort if there are pending holds or we're already ready
|
||||
|
||||
-9
@@ -34,15 +34,6 @@ jQuery.extend( {
|
||||
// the ready event fires. See #6781
|
||||
readyWait: 1,
|
||||
|
||||
// Hold (or release) the ready event
|
||||
holdReady: function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
},
|
||||
|
||||
// Handle when the DOM is ready
|
||||
ready: function( wait ) {
|
||||
|
||||
|
||||
+50
-38
@@ -28,6 +28,7 @@ var
|
||||
// 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]).+)/,
|
||||
rcustomProp = /^--/,
|
||||
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
||||
cssNormalTransform = {
|
||||
letterSpacing: "0",
|
||||
@@ -57,6 +58,16 @@ function vendorPropName( name ) {
|
||||
}
|
||||
}
|
||||
|
||||
// Return a property mapped along what jQuery.cssProps suggests or to
|
||||
// a vendor prefixed property.
|
||||
function finalPropName( name ) {
|
||||
var ret = jQuery.cssProps[ name ];
|
||||
if ( !ret ) {
|
||||
ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function setPositiveNumber( elem, value, subtract ) {
|
||||
|
||||
// Any relative (+/-) values have already been
|
||||
@@ -117,44 +128,31 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
||||
|
||||
function getWidthOrHeight( elem, name, extra ) {
|
||||
|
||||
// Start with offset property, which is equivalent to the border-box value
|
||||
var val,
|
||||
valueIsBorderBox = true,
|
||||
// Start with computed style
|
||||
var valueIsBorderBox,
|
||||
styles = getStyles( elem ),
|
||||
val = curCSS( elem, name, styles ),
|
||||
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a disconnected node
|
||||
// in IE throws an error.
|
||||
if ( elem.getClientRects().length ) {
|
||||
val = elem.getBoundingClientRect()[ name ];
|
||||
// Computed unit is not pixels. Stop here and return.
|
||||
if ( rnumnonpx.test( val ) ) {
|
||||
return val;
|
||||
}
|
||||
|
||||
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
||||
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
||||
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
||||
if ( val <= 0 || val == null ) {
|
||||
// Check for style in case a browser which returns unreliable values
|
||||
// for getComputedStyle silently falls back to the reliable elem.style
|
||||
valueIsBorderBox = isBorderBox &&
|
||||
( support.boxSizingReliable() || val === elem.style[ name ] );
|
||||
|
||||
// Fall back to computed then uncomputed css if necessary
|
||||
val = curCSS( elem, name, styles );
|
||||
if ( val < 0 || val == null ) {
|
||||
val = elem.style[ name ];
|
||||
}
|
||||
|
||||
// Computed unit is not pixels. Stop here and return.
|
||||
if ( rnumnonpx.test( val ) ) {
|
||||
return val;
|
||||
}
|
||||
|
||||
// Check for style in case a browser which returns unreliable values
|
||||
// for getComputedStyle silently falls back to the reliable elem.style
|
||||
valueIsBorderBox = isBorderBox &&
|
||||
( support.boxSizingReliable() || val === elem.style[ name ] );
|
||||
|
||||
// Normalize "", auto, and prepare for extra
|
||||
val = parseFloat( val ) || 0;
|
||||
// Fall back to offsetWidth/Height when value is "auto"
|
||||
// This happens for inline elements with no explicit setting (gh-3571)
|
||||
if ( val === "auto" ) {
|
||||
val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ];
|
||||
}
|
||||
|
||||
// Normalize "", auto, and prepare for extra
|
||||
val = parseFloat( val ) || 0;
|
||||
|
||||
// Use the active box-sizing model to add/subtract irrelevant styles
|
||||
return ( val +
|
||||
augmentWidthOrHeight(
|
||||
@@ -218,10 +216,15 @@ jQuery.extend( {
|
||||
// Make sure that we're working with the right name
|
||||
var ret, type, hooks,
|
||||
origName = jQuery.camelCase( name ),
|
||||
isCustomProp = rcustomProp.test( name ),
|
||||
style = elem.style;
|
||||
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
// Make sure that we're working with the right name. We don't
|
||||
// want to query the value if it is a CSS custom property
|
||||
// since they are user-defined.
|
||||
if ( !isCustomProp ) {
|
||||
name = finalPropName( origName );
|
||||
}
|
||||
|
||||
// Gets hook for the prefixed version, then unprefixed version
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
@@ -257,7 +260,11 @@ jQuery.extend( {
|
||||
if ( !hooks || !( "set" in hooks ) ||
|
||||
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
||||
|
||||
style[ name ] = value;
|
||||
if ( isCustomProp ) {
|
||||
style.setProperty( name, value );
|
||||
} else {
|
||||
style[ name ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -276,11 +283,15 @@ jQuery.extend( {
|
||||
|
||||
css: function( elem, name, extra, styles ) {
|
||||
var val, num, hooks,
|
||||
origName = jQuery.camelCase( name );
|
||||
origName = jQuery.camelCase( name ),
|
||||
isCustomProp = rcustomProp.test( name );
|
||||
|
||||
// Make sure that we're working with the right name
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
// Make sure that we're working with the right name. We don't
|
||||
// want to modify the value if it is a CSS custom property
|
||||
// since they are user-defined.
|
||||
if ( !isCustomProp ) {
|
||||
name = finalPropName( origName );
|
||||
}
|
||||
|
||||
// Try prefixed name followed by the unprefixed name
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
@@ -305,6 +316,7 @@ jQuery.extend( {
|
||||
num = parseFloat( val );
|
||||
return extra === true || isFinite( num ) ? num || 0 : val;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
} );
|
||||
@@ -404,7 +416,7 @@ jQuery.fn.extend( {
|
||||
map = {},
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isArray( name ) ) {
|
||||
if ( Array.isArray( name ) ) {
|
||||
styles = getStyles( elem );
|
||||
len = name.length;
|
||||
|
||||
|
||||
+8
-2
@@ -11,12 +11,18 @@ define( [
|
||||
|
||||
function curCSS( elem, name, computed ) {
|
||||
var width, minWidth, maxWidth, ret,
|
||||
|
||||
// Support: Firefox 51+
|
||||
// Retrieving style before computed somehow
|
||||
// fixes an issue with getting wrong values
|
||||
// on detached elements
|
||||
style = elem.style;
|
||||
|
||||
computed = computed || getStyles( elem );
|
||||
|
||||
// Support: IE <=9 only
|
||||
// getPropertyValue is only needed for .css('filter') (#12537)
|
||||
// getPropertyValue is needed for:
|
||||
// .css('filter') (IE 9 only, #12537)
|
||||
// .css('--customProperty) (#3144)
|
||||
if ( computed ) {
|
||||
ret = computed.getPropertyValue( name ) || computed[ name ];
|
||||
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ Data.prototype = {
|
||||
if ( key !== undefined ) {
|
||||
|
||||
// Support array or space separated string of keys
|
||||
if ( jQuery.isArray( key ) ) {
|
||||
if ( Array.isArray( key ) ) {
|
||||
|
||||
// If key is an array of keys...
|
||||
// We always set camelCase keys, so remove that.
|
||||
|
||||
+8
-6
@@ -13,7 +13,7 @@ function Thrower( ex ) {
|
||||
throw ex;
|
||||
}
|
||||
|
||||
function adoptValue( value, resolve, reject ) {
|
||||
function adoptValue( value, resolve, reject, noValue ) {
|
||||
var method;
|
||||
|
||||
try {
|
||||
@@ -29,9 +29,10 @@ function adoptValue( value, resolve, reject ) {
|
||||
// Other non-thenables
|
||||
} else {
|
||||
|
||||
// Support: Android 4.0 only
|
||||
// Strict mode functions invoked without .call/.apply get global-object context
|
||||
resolve.call( undefined, value );
|
||||
// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
|
||||
// * false: [ value ].slice( 0 ) => resolve( value )
|
||||
// * true: [ value ].slice( 1 ) => resolve()
|
||||
resolve.apply( undefined, [ value ].slice( noValue ) );
|
||||
}
|
||||
|
||||
// For Promises/A+, convert exceptions into rejections
|
||||
@@ -41,7 +42,7 @@ function adoptValue( value, resolve, reject ) {
|
||||
|
||||
// Support: Android 4.0 only
|
||||
// Strict mode functions invoked without .call/.apply get global-object context
|
||||
reject.call( undefined, value );
|
||||
reject.apply( undefined, [ value ] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,7 +367,8 @@ jQuery.extend( {
|
||||
|
||||
// Single- and empty arguments are adopted like Promise.resolve
|
||||
if ( remaining <= 1 ) {
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
||||
!remaining );
|
||||
|
||||
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
||||
if ( master.state() === "pending" ||
|
||||
|
||||
+12
-2
@@ -1,6 +1,7 @@
|
||||
define( [
|
||||
"./core"
|
||||
], function( jQuery ) {
|
||||
"./core",
|
||||
"./core/nodeName"
|
||||
], function( jQuery, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -25,6 +26,15 @@ jQuery.fn.extend( {
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.holdReady = function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
};
|
||||
jQuery.isArray = Array.isArray;
|
||||
jQuery.parseJSON = JSON.parse;
|
||||
jQuery.nodeName = nodeName;
|
||||
|
||||
} );
|
||||
|
||||
+38
-32
@@ -23,13 +23,18 @@ define( [
|
||||
"use strict";
|
||||
|
||||
var
|
||||
fxNow, timerId,
|
||||
fxNow, inProgress,
|
||||
rfxtypes = /^(?:toggle|show|hide)$/,
|
||||
rrun = /queueHooks$/;
|
||||
|
||||
function raf() {
|
||||
if ( timerId ) {
|
||||
window.requestAnimationFrame( raf );
|
||||
function schedule() {
|
||||
if ( inProgress ) {
|
||||
if ( document.hidden === false && window.requestAnimationFrame ) {
|
||||
window.requestAnimationFrame( schedule );
|
||||
} else {
|
||||
window.setTimeout( schedule, jQuery.fx.interval );
|
||||
}
|
||||
|
||||
jQuery.fx.tick();
|
||||
}
|
||||
}
|
||||
@@ -256,7 +261,7 @@ function propFilter( props, specialEasing ) {
|
||||
name = jQuery.camelCase( index );
|
||||
easing = specialEasing[ name ];
|
||||
value = props[ index ];
|
||||
if ( jQuery.isArray( value ) ) {
|
||||
if ( Array.isArray( value ) ) {
|
||||
easing = value[ 1 ];
|
||||
value = props[ index ] = value[ 0 ];
|
||||
}
|
||||
@@ -315,12 +320,19 @@ function Animation( elem, properties, options ) {
|
||||
|
||||
deferred.notifyWith( elem, [ animation, percent, remaining ] );
|
||||
|
||||
// If there's more to do, yield
|
||||
if ( percent < 1 && length ) {
|
||||
return remaining;
|
||||
} else {
|
||||
deferred.resolveWith( elem, [ animation ] );
|
||||
return false;
|
||||
}
|
||||
|
||||
// If this was an empty animation, synthesize a final progress notification
|
||||
if ( !length ) {
|
||||
deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
||||
}
|
||||
|
||||
// Resolve the animation and report its conclusion
|
||||
deferred.resolveWith( elem, [ animation ] );
|
||||
return false;
|
||||
},
|
||||
animation = deferred.promise( {
|
||||
elem: elem,
|
||||
@@ -385,6 +397,13 @@ function Animation( elem, properties, options ) {
|
||||
animation.opts.start.call( elem, animation );
|
||||
}
|
||||
|
||||
// Attach callbacks from options
|
||||
animation
|
||||
.progress( animation.opts.progress )
|
||||
.done( animation.opts.done, animation.opts.complete )
|
||||
.fail( animation.opts.fail )
|
||||
.always( animation.opts.always );
|
||||
|
||||
jQuery.fx.timer(
|
||||
jQuery.extend( tick, {
|
||||
elem: elem,
|
||||
@@ -393,11 +412,7 @@ function Animation( elem, properties, options ) {
|
||||
} )
|
||||
);
|
||||
|
||||
// attach callbacks from options
|
||||
return animation.progress( animation.opts.progress )
|
||||
.done( animation.opts.done, animation.opts.complete )
|
||||
.fail( animation.opts.fail )
|
||||
.always( animation.opts.always );
|
||||
return animation;
|
||||
}
|
||||
|
||||
jQuery.Animation = jQuery.extend( Animation, {
|
||||
@@ -448,8 +463,8 @@ jQuery.speed = function( speed, easing, fn ) {
|
||||
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
|
||||
};
|
||||
|
||||
// Go to the end state if fx are off or if document is hidden
|
||||
if ( jQuery.fx.off || document.hidden ) {
|
||||
// Go to the end state if fx are off
|
||||
if ( jQuery.fx.off ) {
|
||||
opt.duration = 0;
|
||||
|
||||
} else {
|
||||
@@ -641,7 +656,7 @@ jQuery.fx.tick = function() {
|
||||
for ( ; i < timers.length; i++ ) {
|
||||
timer = timers[ i ];
|
||||
|
||||
// Checks the timer has not already been removed
|
||||
// Run the timer and safely remove it when done (allowing for external removal)
|
||||
if ( !timer() && timers[ i ] === timer ) {
|
||||
timers.splice( i--, 1 );
|
||||
}
|
||||
@@ -655,30 +670,21 @@ jQuery.fx.tick = function() {
|
||||
|
||||
jQuery.fx.timer = function( timer ) {
|
||||
jQuery.timers.push( timer );
|
||||
if ( timer() ) {
|
||||
jQuery.fx.start();
|
||||
} else {
|
||||
jQuery.timers.pop();
|
||||
}
|
||||
jQuery.fx.start();
|
||||
};
|
||||
|
||||
jQuery.fx.interval = 13;
|
||||
jQuery.fx.start = function() {
|
||||
if ( !timerId ) {
|
||||
timerId = window.requestAnimationFrame ?
|
||||
window.requestAnimationFrame( raf ) :
|
||||
window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
|
||||
if ( inProgress ) {
|
||||
return;
|
||||
}
|
||||
|
||||
inProgress = true;
|
||||
schedule();
|
||||
};
|
||||
|
||||
jQuery.fx.stop = function() {
|
||||
if ( window.cancelAnimationFrame ) {
|
||||
window.cancelAnimationFrame( timerId );
|
||||
} else {
|
||||
window.clearInterval( timerId );
|
||||
}
|
||||
|
||||
timerId = null;
|
||||
inProgress = null;
|
||||
};
|
||||
|
||||
jQuery.fx.speeds = {
|
||||
|
||||
+4
-3
@@ -5,10 +5,11 @@ define( [
|
||||
"./var/rnothtmlwhite",
|
||||
"./var/slice",
|
||||
"./data/var/dataPriv",
|
||||
"./core/nodeName",
|
||||
|
||||
"./core/init",
|
||||
"./selector"
|
||||
], function( jQuery, document, documentElement, rnothtmlwhite, slice, dataPriv ) {
|
||||
], function( jQuery, document, documentElement, rnothtmlwhite, slice, dataPriv, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -476,7 +477,7 @@ jQuery.event = {
|
||||
|
||||
// For checkbox, fire native event so checked state will be right
|
||||
trigger: function() {
|
||||
if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
|
||||
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
|
||||
this.click();
|
||||
return false;
|
||||
}
|
||||
@@ -484,7 +485,7 @@ jQuery.event = {
|
||||
|
||||
// For cross-browser consistency, don't fire native .click() on links
|
||||
_default: function( event ) {
|
||||
return jQuery.nodeName( event.target, "a" );
|
||||
return nodeName( event.target, "a" );
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
+6
-4
@@ -16,6 +16,7 @@ define( [
|
||||
"./data/var/dataUser",
|
||||
"./data/var/acceptData",
|
||||
"./core/DOMEval",
|
||||
"./core/nodeName",
|
||||
|
||||
"./core/init",
|
||||
"./traversing",
|
||||
@@ -24,7 +25,7 @@ define( [
|
||||
], function( jQuery, concat, push, access,
|
||||
rcheckableType, rtagName, rscriptType,
|
||||
wrapMap, getAll, setGlobalEval, buildFragment, support,
|
||||
dataPriv, dataUser, acceptData, DOMEval ) {
|
||||
dataPriv, dataUser, acceptData, DOMEval, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -47,11 +48,12 @@ var
|
||||
rscriptTypeMasked = /^true\/(.*)/,
|
||||
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
||||
|
||||
// Prefer a tbody over its parent table for containing new rows
|
||||
function manipulationTarget( elem, content ) {
|
||||
if ( jQuery.nodeName( elem, "table" ) &&
|
||||
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
||||
if ( nodeName( elem, "table" ) &&
|
||||
nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
||||
|
||||
return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
|
||||
return jQuery( ">tbody", elem )[ 0 ] || elem;
|
||||
}
|
||||
|
||||
return elem;
|
||||
|
||||
+4
-3
@@ -1,6 +1,7 @@
|
||||
define( [
|
||||
"../core"
|
||||
], function( jQuery ) {
|
||||
"../core",
|
||||
"../core/nodeName"
|
||||
], function( jQuery, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -20,7 +21,7 @@ function getAll( context, tag ) {
|
||||
ret = [];
|
||||
}
|
||||
|
||||
if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {
|
||||
if ( tag === undefined || tag && nodeName( context, tag ) ) {
|
||||
return jQuery.merge( [ context ], ret );
|
||||
}
|
||||
|
||||
|
||||
+21
-24
@@ -7,21 +7,16 @@ define( [
|
||||
"./css/curCSS",
|
||||
"./css/addGetHookIf",
|
||||
"./css/support",
|
||||
"./core/nodeName",
|
||||
|
||||
"./core/init",
|
||||
"./css",
|
||||
"./selector" // contains
|
||||
], function( jQuery, access, document, documentElement, rnumnonpx, curCSS, addGetHookIf, support ) {
|
||||
], function( jQuery, access, document, documentElement, rnumnonpx,
|
||||
curCSS, addGetHookIf, support, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Gets a window from an element
|
||||
*/
|
||||
function getWindow( elem ) {
|
||||
return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
|
||||
}
|
||||
|
||||
jQuery.offset = {
|
||||
setOffset: function( elem, options, i ) {
|
||||
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
||||
@@ -86,13 +81,14 @@ jQuery.fn.extend( {
|
||||
} );
|
||||
}
|
||||
|
||||
var docElem, win, rect, doc,
|
||||
var doc, docElem, rect, win,
|
||||
elem = this[ 0 ];
|
||||
|
||||
if ( !elem ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a
|
||||
// disconnected node in IE throws an error
|
||||
@@ -102,20 +98,14 @@ jQuery.fn.extend( {
|
||||
|
||||
rect = elem.getBoundingClientRect();
|
||||
|
||||
// Make sure element is not hidden (display: none)
|
||||
if ( rect.width || rect.height ) {
|
||||
doc = elem.ownerDocument;
|
||||
win = getWindow( doc );
|
||||
docElem = doc.documentElement;
|
||||
doc = elem.ownerDocument;
|
||||
docElem = doc.documentElement;
|
||||
win = doc.defaultView;
|
||||
|
||||
return {
|
||||
top: rect.top + win.pageYOffset - docElem.clientTop,
|
||||
left: rect.left + win.pageXOffset - docElem.clientLeft
|
||||
};
|
||||
}
|
||||
|
||||
// Return zeros for disconnected and hidden elements (gh-2310)
|
||||
return rect;
|
||||
return {
|
||||
top: rect.top + win.pageYOffset - docElem.clientTop,
|
||||
left: rect.left + win.pageXOffset - docElem.clientLeft
|
||||
};
|
||||
},
|
||||
|
||||
position: function() {
|
||||
@@ -141,7 +131,7 @@ jQuery.fn.extend( {
|
||||
|
||||
// Get correct offsets
|
||||
offset = this.offset();
|
||||
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
|
||||
if ( !nodeName( offsetParent[ 0 ], "html" ) ) {
|
||||
parentOffset = offsetParent.offset();
|
||||
}
|
||||
|
||||
@@ -188,7 +178,14 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(
|
||||
|
||||
jQuery.fn[ method ] = function( val ) {
|
||||
return access( this, function( elem, method, val ) {
|
||||
var win = getWindow( elem );
|
||||
|
||||
// Coalesce documents and windows
|
||||
var win;
|
||||
if ( jQuery.isWindow( elem ) ) {
|
||||
win = elem;
|
||||
} else if ( elem.nodeType === 9 ) {
|
||||
win = elem.defaultView;
|
||||
}
|
||||
|
||||
if ( val === undefined ) {
|
||||
return win ? win[ prop ] : elem[ method ];
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ jQuery.extend( {
|
||||
|
||||
// Speed up dequeue by getting out quickly if this is just a lookup
|
||||
if ( data ) {
|
||||
if ( !queue || jQuery.isArray( data ) ) {
|
||||
if ( !queue || Array.isArray( data ) ) {
|
||||
queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
|
||||
} else {
|
||||
queue.push( data );
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@ var
|
||||
function buildParams( prefix, obj, traditional, add ) {
|
||||
var name;
|
||||
|
||||
if ( jQuery.isArray( obj ) ) {
|
||||
if ( Array.isArray( obj ) ) {
|
||||
|
||||
// Serialize array item.
|
||||
jQuery.each( obj, function( i, v ) {
|
||||
@@ -69,7 +69,7 @@ jQuery.param = function( a, traditional ) {
|
||||
};
|
||||
|
||||
// If an array was passed in, assume that it is an array of form elements.
|
||||
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
||||
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
||||
|
||||
// Serialize the form elements
|
||||
jQuery.each( a, function() {
|
||||
@@ -115,7 +115,7 @@ jQuery.fn.extend( {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( jQuery.isArray( val ) ) {
|
||||
if ( Array.isArray( val ) ) {
|
||||
return jQuery.map( val, function( val ) {
|
||||
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
||||
} );
|
||||
|
||||
+15
-2
@@ -4,10 +4,12 @@ define( [
|
||||
"./traversing/var/dir",
|
||||
"./traversing/var/siblings",
|
||||
"./traversing/var/rneedsContext",
|
||||
"./core/nodeName",
|
||||
|
||||
"./core/init",
|
||||
"./traversing/findFilter",
|
||||
"./selector"
|
||||
], function( jQuery, indexOf, dir, siblings, rneedsContext ) {
|
||||
], function( jQuery, indexOf, dir, siblings, rneedsContext, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -143,7 +145,18 @@ jQuery.each( {
|
||||
return siblings( elem.firstChild );
|
||||
},
|
||||
contents: function( elem ) {
|
||||
return elem.contentDocument || jQuery.merge( [], elem.childNodes );
|
||||
if ( nodeName( elem, "iframe" ) ) {
|
||||
return elem.contentDocument;
|
||||
}
|
||||
|
||||
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
|
||||
// Treat the template element as a regular one in browsers that
|
||||
// don't support it.
|
||||
if ( nodeName( elem, "template" ) ) {
|
||||
elem = elem.content || elem;
|
||||
}
|
||||
|
||||
return jQuery.merge( [], elem.childNodes );
|
||||
}
|
||||
}, function( name, fn ) {
|
||||
jQuery.fn[ name ] = function( until, selector ) {
|
||||
|
||||
Reference in New Issue
Block a user