Comparing version 3.1.1 to 3.2.0
@@ -296,1 +296,7 @@ Authors ordered by first contribution. | ||
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> |
@@ -27,3 +27,3 @@ /* global Symbol */ | ||
var | ||
version = "3.1.1", | ||
version = "3.2.0", | ||
@@ -176,7 +176,7 @@ // Define a local copy of jQuery | ||
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 : []; | ||
@@ -220,4 +220,2 @@ } else { | ||
isArray: Array.isArray, | ||
isWindow: function( obj ) { | ||
@@ -297,6 +295,2 @@ return obj != null && obj === obj.window; | ||
nodeName: function( elem, name ) { | ||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); | ||
}, | ||
each: function( obj, callback ) { | ||
@@ -303,0 +297,0 @@ var length, i = 0; |
@@ -1,2 +0,2 @@ | ||
Copyright jQuery Foundation and other contributors, https://jquery.org/ | ||
Copyright JS Foundation and other contributors, https://js.foundation/ | ||
@@ -3,0 +3,0 @@ This software consists of voluntary contributions made by many |
@@ -5,8 +5,8 @@ { | ||
"description": "JavaScript library for DOM operations", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"main": "dist/jquery.js", | ||
"homepage": "https://jquery.com", | ||
"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.0/AUTHORS.txt" | ||
}, | ||
@@ -95,5 +95,5 @@ "repository": { | ||
], | ||
"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? [^#])" | ||
} | ||
} |
@@ -17,3 +17,3 @@ # jQuery | ||
```html | ||
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script> | ||
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | ||
``` | ||
@@ -20,0 +20,0 @@ |
{ | ||
// 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" | ||
} |
define( [ | ||
"../core", | ||
"../core/access", | ||
"../core/nodeName", | ||
"./support", | ||
"../var/rnothtmlwhite", | ||
"../selector" | ||
], function( jQuery, access, support, rnothtmlwhite ) { | ||
], function( jQuery, access, nodeName, support, rnothtmlwhite ) { | ||
@@ -77,3 +78,3 @@ "use strict"; | ||
if ( !support.radioValue && value === "radio" && | ||
jQuery.nodeName( elem, "input" ) ) { | ||
nodeName( elem, "input" ) ) { | ||
var val = elem.value; | ||
@@ -80,0 +81,0 @@ elem.setAttribute( "type", value ); |
@@ -5,4 +5,6 @@ define( [ | ||
"./support", | ||
"../core/nodeName", | ||
"../core/init" | ||
], function( jQuery, stripAndCollapse, support ) { | ||
], function( jQuery, stripAndCollapse, support, nodeName ) { | ||
@@ -66,3 +68,3 @@ "use strict"; | ||
} else if ( jQuery.isArray( val ) ) { | ||
} else if ( Array.isArray( val ) ) { | ||
val = jQuery.map( val, function( value ) { | ||
@@ -126,3 +128,3 @@ return value == null ? "" : value + ""; | ||
( !option.parentNode.disabled || | ||
!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { | ||
!nodeName( option.parentNode, "optgroup" ) ) ) { | ||
@@ -179,3 +181,3 @@ // Get the specific value for the option | ||
set: function( elem, value ) { | ||
if ( jQuery.isArray( value ) ) { | ||
if ( Array.isArray( value ) ) { | ||
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); | ||
@@ -182,0 +184,0 @@ } |
@@ -72,3 +72,3 @@ define( [ | ||
// Enforce single-firing | ||
locked = options.once; | ||
locked = locked || options.once; | ||
@@ -75,0 +75,0 @@ // Execute callbacks for all pending executions, |
@@ -27,3 +27,3 @@ /* global Symbol */ | ||
var | ||
version = "3.1.1", | ||
version = "3.2.0", | ||
@@ -176,7 +176,7 @@ // Define a local copy of jQuery | ||
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 : []; | ||
@@ -220,4 +220,2 @@ } else { | ||
isArray: Array.isArray, | ||
isWindow: function( obj ) { | ||
@@ -297,6 +295,2 @@ return obj != null && obj === obj.window; | ||
nodeName: function( elem, name ) { | ||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); | ||
}, | ||
each: function( obj, callback ) { | ||
@@ -303,0 +297,0 @@ var length, i = 0; |
@@ -6,2 +6,3 @@ // Initialize a jQuery object | ||
"./var/rsingleTag", | ||
"../traversing/findFilter" | ||
@@ -8,0 +9,0 @@ ], function( jQuery, document, rsingleTag ) { |
@@ -35,11 +35,2 @@ define( [ | ||
// Hold (or release) the ready event | ||
holdReady: function( hold ) { | ||
if ( hold ) { | ||
jQuery.readyWait++; | ||
} else { | ||
jQuery.ready( true ); | ||
} | ||
}, | ||
ready: function( wait ) { | ||
@@ -46,0 +37,0 @@ |
@@ -37,11 +37,2 @@ define( [ | ||
// Hold (or release) the ready event | ||
holdReady: function( hold ) { | ||
if ( hold ) { | ||
jQuery.readyWait++; | ||
} else { | ||
jQuery.ready( true ); | ||
} | ||
}, | ||
// Handle when the DOM is ready | ||
@@ -48,0 +39,0 @@ ready: function( wait ) { |
@@ -31,2 +31,3 @@ define( [ | ||
rdisplayswap = /^(none|table(?!-c[ea]).+)/, | ||
rcustomProp = /^--/, | ||
cssShow = { position: "absolute", visibility: "hidden", display: "block" }, | ||
@@ -61,2 +62,12 @@ cssNormalTransform = { | ||
// 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 ) { | ||
@@ -122,40 +133,21 @@ | ||
// 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 ]; | ||
} | ||
// Normalize "", auto, and prepare for extra | ||
val = parseFloat( val ) || 0; | ||
// 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; | ||
} | ||
// Use the active box-sizing model to add/subtract irrelevant styles | ||
@@ -224,6 +216,11 @@ return ( val + | ||
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 ); | ||
} | ||
@@ -264,3 +261,7 @@ // Gets hook for the prefixed version, then unprefixed version | ||
style[ name ] = value; | ||
if ( isCustomProp ) { | ||
style.setProperty( name, value ); | ||
} else { | ||
style[ name ] = value; | ||
} | ||
} | ||
@@ -284,7 +285,11 @@ | ||
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 ); | ||
} | ||
@@ -314,2 +319,3 @@ // Try prefixed name followed by the unprefixed name | ||
} | ||
return val; | ||
@@ -414,3 +420,3 @@ } | ||
if ( jQuery.isArray( name ) ) { | ||
if ( Array.isArray( name ) ) { | ||
styles = getStyles( elem ); | ||
@@ -417,0 +423,0 @@ len = name.length; |
@@ -18,4 +18,5 @@ define( [ | ||
// 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 ) { | ||
@@ -22,0 +23,0 @@ ret = computed.getPropertyValue( name ) || computed[ name ]; |
@@ -118,3 +118,3 @@ define( [ | ||
// Support array or space separated string of keys | ||
if ( jQuery.isArray( key ) ) { | ||
if ( Array.isArray( key ) ) { | ||
@@ -121,0 +121,0 @@ // If key is an array of keys... |
@@ -16,3 +16,3 @@ define( [ | ||
function adoptValue( value, resolve, reject ) { | ||
function adoptValue( value, resolve, reject, noValue ) { | ||
var method; | ||
@@ -33,5 +33,6 @@ | ||
// 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 ) ); | ||
} | ||
@@ -46,3 +47,3 @@ | ||
// Strict mode functions invoked without .call/.apply get global-object context | ||
reject.call( undefined, value ); | ||
reject.apply( undefined, [ value ] ); | ||
} | ||
@@ -372,3 +373,4 @@ } | ||
if ( remaining <= 1 ) { | ||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject ); | ||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, | ||
!remaining ); | ||
@@ -375,0 +377,0 @@ // Use .then() to unwrap secondary thenables (cf. gh-3000) |
define( [ | ||
"./core" | ||
], function( jQuery ) { | ||
"./core", | ||
"./core/nodeName" | ||
], function( jQuery, nodeName ) { | ||
@@ -25,7 +26,16 @@ "use strict"; | ||
this.off( types, selector || "**", fn ); | ||
}, | ||
holdReady: function( hold ) { | ||
if ( hold ) { | ||
jQuery.readyWait++; | ||
} else { | ||
jQuery.ready( true ); | ||
} | ||
} | ||
} ); | ||
jQuery.isArray = Array.isArray; | ||
jQuery.parseJSON = JSON.parse; | ||
jQuery.nodeName = nodeName; | ||
} ); |
@@ -26,9 +26,14 @@ define( [ | ||
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(); | ||
@@ -260,3 +265,3 @@ } | ||
value = props[ index ]; | ||
if ( jQuery.isArray( value ) ) { | ||
if ( Array.isArray( value ) ) { | ||
easing = value[ 1 ]; | ||
@@ -320,8 +325,15 @@ value = props[ index ] = value[ 0 ]; | ||
// 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; | ||
}, | ||
@@ -391,2 +403,9 @@ animation = deferred.promise( { | ||
// 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( | ||
@@ -400,7 +419,3 @@ jQuery.extend( tick, { | ||
// 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; | ||
} | ||
@@ -456,4 +471,4 @@ | ||
// 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; | ||
@@ -650,3 +665,3 @@ | ||
// 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 ) { | ||
@@ -665,7 +680,3 @@ timers.splice( i--, 1 ); | ||
jQuery.timers.push( timer ); | ||
if ( timer() ) { | ||
jQuery.fx.start(); | ||
} else { | ||
jQuery.timers.pop(); | ||
} | ||
jQuery.fx.start(); | ||
}; | ||
@@ -675,17 +686,12 @@ | ||
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; | ||
}; | ||
@@ -692,0 +698,0 @@ |
@@ -6,8 +6,11 @@ define( [ | ||
"./var/rnothtmlwhite", | ||
"./var/rcheckableType", | ||
"./var/slice", | ||
"./data/var/dataPriv", | ||
"./core/nodeName", | ||
"./core/init", | ||
"./selector" | ||
], function( jQuery, document, documentElement, rnothtmlwhite, slice, dataPriv ) { | ||
], function( jQuery, document, documentElement, rnothtmlwhite, | ||
rcheckableType, slice, dataPriv, nodeName ) { | ||
@@ -478,5 +481,7 @@ "use strict"; | ||
// For checkbox, fire native event so checked state will be right | ||
// For checkable types, fire native event so checked state will be right | ||
trigger: function() { | ||
if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { | ||
if ( rcheckableType.test( this.type ) && | ||
this.click && nodeName( this, "input" ) ) { | ||
this.click(); | ||
@@ -489,3 +494,3 @@ return false; | ||
_default: function( event ) { | ||
return jQuery.nodeName( event.target, "a" ); | ||
return nodeName( event.target, "a" ); | ||
} | ||
@@ -492,0 +497,0 @@ }, |
@@ -5,4 +5,4 @@ define( [ | ||
"./var/push", | ||
"./var/rcheckableType", | ||
"./core/access", | ||
"./manipulation/var/rcheckableType", | ||
"./manipulation/var/rtagName", | ||
@@ -20,2 +20,3 @@ "./manipulation/var/rscriptType", | ||
"./core/DOMEval", | ||
"./core/nodeName", | ||
@@ -26,6 +27,6 @@ "./core/init", | ||
"./event" | ||
], function( jQuery, concat, push, access, | ||
rcheckableType, rtagName, rscriptType, | ||
], function( jQuery, concat, push, rcheckableType, | ||
access, rtagName, rscriptType, | ||
wrapMap, getAll, setGlobalEval, buildFragment, support, | ||
dataPriv, dataUser, acceptData, DOMEval ) { | ||
dataPriv, dataUser, acceptData, DOMEval, nodeName ) { | ||
@@ -53,7 +54,8 @@ "use strict"; | ||
// 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; | ||
} | ||
@@ -60,0 +62,0 @@ |
define( [ | ||
"../core" | ||
], function( jQuery ) { | ||
"../core", | ||
"../core/nodeName" | ||
], function( jQuery, nodeName ) { | ||
@@ -23,3 +24,3 @@ "use strict"; | ||
if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) { | ||
if ( tag === undefined || tag && nodeName( context, tag ) ) { | ||
return jQuery.merge( [ context ], ret ); | ||
@@ -26,0 +27,0 @@ } |
@@ -10,2 +10,3 @@ define( [ | ||
"./css/support", | ||
"./core/nodeName", | ||
@@ -15,13 +16,7 @@ "./core/init", | ||
"./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 = { | ||
@@ -91,3 +86,3 @@ setOffset: function( elem, options, i ) { | ||
var docElem, win, rect, doc, | ||
var doc, docElem, rect, win, | ||
elem = this[ 0 ]; | ||
@@ -99,2 +94,3 @@ | ||
// Return zeros for disconnected and hidden (display: none) elements (gh-2310) | ||
// Support: IE <=11 only | ||
@@ -109,16 +105,10 @@ // Running getBoundingClientRect on a | ||
// 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 | ||
}; | ||
}, | ||
@@ -149,3 +139,3 @@ | ||
offset = this.offset(); | ||
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { | ||
if ( !nodeName( offsetParent[ 0 ], "html" ) ) { | ||
parentOffset = offsetParent.offset(); | ||
@@ -197,4 +187,11 @@ } | ||
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 ) { | ||
@@ -201,0 +198,0 @@ return win ? win[ prop ] : elem[ method ]; |
@@ -20,3 +20,3 @@ define( [ | ||
if ( data ) { | ||
if ( !queue || jQuery.isArray( data ) ) { | ||
if ( !queue || Array.isArray( data ) ) { | ||
queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); | ||
@@ -23,0 +23,0 @@ } else { |
define( [ | ||
"./core", | ||
"./manipulation/var/rcheckableType", | ||
"./var/rcheckableType", | ||
"./core/init", | ||
@@ -20,3 +20,3 @@ "./traversing", // filter | ||
if ( jQuery.isArray( obj ) ) { | ||
if ( Array.isArray( obj ) ) { | ||
@@ -73,3 +73,3 @@ // Serialize array item. | ||
// 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 ) ) ) { | ||
@@ -120,3 +120,3 @@ // Serialize the form elements | ||
if ( jQuery.isArray( val ) ) { | ||
if ( Array.isArray( val ) ) { | ||
return jQuery.map( val, function( val ) { | ||
@@ -123,0 +123,0 @@ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; |
@@ -7,6 +7,8 @@ define( [ | ||
"./traversing/var/rneedsContext", | ||
"./core/nodeName", | ||
"./core/init", | ||
"./traversing/findFilter", | ||
"./selector" | ||
], function( jQuery, indexOf, dir, siblings, rneedsContext ) { | ||
], function( jQuery, indexOf, dir, siblings, rneedsContext, nodeName ) { | ||
@@ -147,3 +149,14 @@ "use strict"; | ||
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 ); | ||
} | ||
@@ -150,0 +163,0 @@ }, function( name, fn ) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1244764
119
25318