mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Revert "Misc: Drop support for older browsers; update support comments"
This reverts commit 90d7cc1d8b
.
This commit is contained in:
parent
f21d43a114
commit
e3c8968509
@ -14,7 +14,7 @@ In the spirit of open source software development, jQuery always encourages comm
|
|||||||
Environments in which to use jQuery
|
Environments in which to use jQuery
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
- [Browser support](http://jquery.com/browser-support/) differs between the master branch and the compat branch. Specifically, the master branch does not support legacy browsers such as IE8. The jQuery team continues to provide support for legacy browsers on the compat branch. Use the latest compat release if support for those browsers is required. See [browser support](http://jquery.com/browser-support/) for more info.
|
- [Browser support](http://jquery.com/browser-support/) differs between the master branch and the compat branch. Specifically, the master branch does not support legacy browsers such as IE6-8. The jQuery team continues to provide support for legacy browsers on the compat branch. Use the latest compat release if support for those browsers is required. See [browser support](http://jquery.com/browser-support/) for more info.
|
||||||
- To use jQuery in Node, browser extensions, and other non-browser environments, use only master branch releases given the name "jquery" rather than "jquery-compat". The compat branch does not support these environments.
|
- To use jQuery in Node, browser extensions, and other non-browser environments, use only master branch releases given the name "jquery" rather than "jquery-compat". The compat branch does not support these environments.
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"undef": true,
|
"undef": true,
|
||||||
"unused": true,
|
"unused": true,
|
||||||
|
|
||||||
|
"evil": true,
|
||||||
"sub": true,
|
"sub": true,
|
||||||
|
|
||||||
// Support: IE < 10, Android < 4.1
|
// Support: IE < 10, Android < 4.1
|
||||||
|
17
src/ajax.js
17
src/ajax.js
@ -5,6 +5,7 @@ define( [
|
|||||||
"./ajax/var/location",
|
"./ajax/var/location",
|
||||||
"./ajax/var/nonce",
|
"./ajax/var/nonce",
|
||||||
"./ajax/var/rquery",
|
"./ajax/var/rquery",
|
||||||
|
|
||||||
"./core/init",
|
"./core/init",
|
||||||
"./ajax/parseJSON",
|
"./ajax/parseJSON",
|
||||||
"./ajax/parseXML",
|
"./ajax/parseXML",
|
||||||
@ -68,7 +69,7 @@ function addToPrefiltersOrTransports( structure ) {
|
|||||||
while ( ( dataType = dataTypes[ i++ ] ) ) {
|
while ( ( dataType = dataTypes[ i++ ] ) ) {
|
||||||
|
|
||||||
// Prepend if requested
|
// Prepend if requested
|
||||||
if ( dataType[ 0 ] === "+" ) {
|
if ( dataType.charAt( 0 ) === "+" ) {
|
||||||
dataType = dataType.slice( 1 ) || "*";
|
dataType = dataType.slice( 1 ) || "*";
|
||||||
( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
|
( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
|
||||||
|
|
||||||
@ -264,7 +265,7 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
|||||||
if ( conv !== true ) {
|
if ( conv !== true ) {
|
||||||
|
|
||||||
// Unless errors are allowed to bubble, catch and return them
|
// Unless errors are allowed to bubble, catch and return them
|
||||||
if ( conv && s.throws ) {
|
if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation
|
||||||
response = conv( response );
|
response = conv( response );
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
@ -520,7 +521,7 @@ jQuery.extend( {
|
|||||||
jqXHR.error = jqXHR.fail;
|
jqXHR.error = jqXHR.fail;
|
||||||
|
|
||||||
// Remove hash character (#7531: and string promotion)
|
// Remove hash character (#7531: and string promotion)
|
||||||
// Add protocol if not provided (prefilters might expect it)
|
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
|
||||||
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
||||||
// We also use the url parameter if available
|
// We also use the url parameter if available
|
||||||
s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
|
s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
|
||||||
@ -536,12 +537,12 @@ jQuery.extend( {
|
|||||||
if ( s.crossDomain == null ) {
|
if ( s.crossDomain == null ) {
|
||||||
urlAnchor = document.createElement( "a" );
|
urlAnchor = document.createElement( "a" );
|
||||||
|
|
||||||
// Support: IE8-11+
|
// Support: IE6-11+
|
||||||
// IE throws exception if url is malformed, e.g. http://example.com:80x/
|
// IE throws exception if url is malformed, e.g. http://example.com:80x/
|
||||||
try {
|
try {
|
||||||
urlAnchor.href = s.url;
|
urlAnchor.href = s.url;
|
||||||
|
|
||||||
// Support: IE8-11+
|
// Support: IE6-11+
|
||||||
// Anchor's host property isn't correctly set when s.url is relative
|
// Anchor's host property isn't correctly set when s.url is relative
|
||||||
urlAnchor.href = urlAnchor.href;
|
urlAnchor.href = urlAnchor.href;
|
||||||
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
||||||
@ -650,9 +651,9 @@ jQuery.extend( {
|
|||||||
strAbort = "abort";
|
strAbort = "abort";
|
||||||
|
|
||||||
// Install callbacks on deferreds
|
// Install callbacks on deferreds
|
||||||
for ( i in { success: 1, error: 1, complete: 1 } ) {
|
completeDeferred.add( s.complete );
|
||||||
jqXHR[ i ]( s[ i ] );
|
jqXHR.done( s.success );
|
||||||
}
|
jqXHR.fail( s.error );
|
||||||
|
|
||||||
// Get transport
|
// Get transport
|
||||||
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
||||||
|
@ -2,10 +2,50 @@ define( [
|
|||||||
"../core"
|
"../core"
|
||||||
], function( jQuery ) {
|
], function( jQuery ) {
|
||||||
|
|
||||||
// Support: Android 2.3
|
var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
|
||||||
// Workaround failure to string-cast null input
|
|
||||||
jQuery.parseJSON = function( data ) {
|
jQuery.parseJSON = function( data ) {
|
||||||
return JSON.parse( data + "" );
|
|
||||||
|
// Attempt to parse using the native JSON parser first
|
||||||
|
if ( window.JSON && window.JSON.parse ) {
|
||||||
|
|
||||||
|
// Support: Android 2.3
|
||||||
|
// Workaround failure to string-cast null input
|
||||||
|
return window.JSON.parse( data + "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
var requireNonComma,
|
||||||
|
depth = null,
|
||||||
|
str = jQuery.trim( data + "" );
|
||||||
|
|
||||||
|
// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
|
||||||
|
// after removing valid tokens
|
||||||
|
return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
|
||||||
|
|
||||||
|
// Force termination if we see a misplaced comma
|
||||||
|
if ( requireNonComma && comma ) {
|
||||||
|
depth = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Perform no more replacements after returning to outermost depth
|
||||||
|
if ( depth === 0 ) {
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Commas must not follow "[", "{", or ","
|
||||||
|
requireNonComma = open || comma;
|
||||||
|
|
||||||
|
// Determine new depth
|
||||||
|
// array/object open ("[" or "{"): depth += true - false (increment)
|
||||||
|
// array/object close ("]" or "}"): depth += false - true (decrement)
|
||||||
|
// other cases ("," or primitive): depth += true - true (numeric cast)
|
||||||
|
depth += !close - !open;
|
||||||
|
|
||||||
|
// Remove this token
|
||||||
|
return "";
|
||||||
|
} ) ) ?
|
||||||
|
( Function( "return " + str ) )() :
|
||||||
|
jQuery.error( "Invalid JSON: " + data );
|
||||||
};
|
};
|
||||||
|
|
||||||
return jQuery.parseJSON;
|
return jQuery.parseJSON;
|
||||||
|
@ -85,8 +85,9 @@ jQuery.ajaxTransport( "script", function( s ) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
|
||||||
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
||||||
head.appendChild( script );
|
head.insertBefore( script, head.firstChild );
|
||||||
},
|
},
|
||||||
|
|
||||||
abort: function() {
|
abort: function() {
|
||||||
|
@ -9,7 +9,7 @@ define( [
|
|||||||
// (This is still attached to ajaxSettings for backward compatibility)
|
// (This is still attached to ajaxSettings for backward compatibility)
|
||||||
jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
|
jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
|
||||||
|
|
||||||
// Support: IE8
|
// Support: IE6-IE8
|
||||||
function() {
|
function() {
|
||||||
|
|
||||||
// XHR cannot access local files, always use ActiveX for that case
|
// XHR cannot access local files, always use ActiveX for that case
|
||||||
@ -17,7 +17,7 @@ jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
|
|||||||
return createActiveXHR();
|
return createActiveXHR();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: IE 10-11
|
// Support: IE 9-11
|
||||||
// IE seems to error on cross-domain PATCH requests when ActiveX XHR
|
// IE seems to error on cross-domain PATCH requests when ActiveX XHR
|
||||||
// is used. In IE 9+ always use the native XHR.
|
// is used. In IE 9+ always use the native XHR.
|
||||||
// Note: this condition won't catch Edge as it doesn't define
|
// Note: this condition won't catch Edge as it doesn't define
|
||||||
@ -172,6 +172,11 @@ if ( xhrSupported ) {
|
|||||||
|
|
||||||
// If we're in sync mode we fire the callback
|
// If we're in sync mode we fire the callback
|
||||||
callback();
|
callback();
|
||||||
|
} else if ( xhr.readyState === 4 ) {
|
||||||
|
|
||||||
|
// (IE6 & IE7) if it's in cache and has been
|
||||||
|
// retrieved directly we need to fire the callback
|
||||||
|
window.setTimeout( callback );
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Register the callback, but delay it in case `xhr.send` throws
|
// Register the callback, but delay it in case `xhr.send` throws
|
||||||
|
@ -7,9 +7,10 @@ define( [
|
|||||||
"../selector"
|
"../selector"
|
||||||
], function( jQuery, access, support, rnotwhite ) {
|
], function( jQuery, access, support, rnotwhite ) {
|
||||||
|
|
||||||
var boolHook,
|
var nodeHook, boolHook,
|
||||||
attrHandle = jQuery.expr.attrHandle,
|
attrHandle = jQuery.expr.attrHandle,
|
||||||
ruseDefault = /^(?:checked|selected)$/i,
|
ruseDefault = /^(?:checked|selected)$/i,
|
||||||
|
getSetAttribute = support.getSetAttribute,
|
||||||
getSetInput = support.input;
|
getSetInput = support.input;
|
||||||
|
|
||||||
jQuery.fn.extend( {
|
jQuery.fn.extend( {
|
||||||
@ -44,7 +45,7 @@ jQuery.extend( {
|
|||||||
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
hooks = jQuery.attrHooks[ name ] ||
|
hooks = jQuery.attrHooks[ name ] ||
|
||||||
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( value !== undefined ) {
|
if ( value !== undefined ) {
|
||||||
@ -104,7 +105,7 @@ jQuery.extend( {
|
|||||||
if ( jQuery.expr.match.bool.test( name ) ) {
|
if ( jQuery.expr.match.bool.test( name ) ) {
|
||||||
|
|
||||||
// Set corresponding property to false
|
// Set corresponding property to false
|
||||||
if ( getSetInput || !ruseDefault.test( name ) ) {
|
if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
|
||||||
elem[ propName ] = false;
|
elem[ propName ] = false;
|
||||||
|
|
||||||
// Support: IE<9
|
// Support: IE<9
|
||||||
@ -113,9 +114,13 @@ jQuery.extend( {
|
|||||||
elem[ jQuery.camelCase( "default-" + name ) ] =
|
elem[ jQuery.camelCase( "default-" + name ) ] =
|
||||||
elem[ propName ] = false;
|
elem[ propName ] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See #9699 for explanation of this approach (setting first, then removal)
|
||||||
|
} else {
|
||||||
|
jQuery.attr( elem, name, "" );
|
||||||
}
|
}
|
||||||
|
|
||||||
elem.removeAttribute( name );
|
elem.removeAttribute( getSetAttribute ? name : propName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,8 +133,10 @@ boolHook = {
|
|||||||
|
|
||||||
// Remove boolean attributes when set to false
|
// Remove boolean attributes when set to false
|
||||||
jQuery.removeAttr( elem, name );
|
jQuery.removeAttr( elem, name );
|
||||||
} else if ( getSetInput || !ruseDefault.test( name ) ) {
|
} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
|
||||||
elem.setAttribute( jQuery.propFix[ name ] || name, name );
|
|
||||||
|
// IE<8 needs the *property* name
|
||||||
|
elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -144,7 +151,7 @@ boolHook = {
|
|||||||
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
||||||
var getter = attrHandle[ name ] || jQuery.find.attr;
|
var getter = attrHandle[ name ] || jQuery.find.attr;
|
||||||
|
|
||||||
if ( getSetInput || !ruseDefault.test( name ) ) {
|
if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
|
||||||
attrHandle[ name ] = function( elem, name, isXML ) {
|
attrHandle[ name ] = function( elem, name, isXML ) {
|
||||||
var ret, handle;
|
var ret, handle;
|
||||||
if ( !isXML ) {
|
if ( !isXML ) {
|
||||||
@ -171,18 +178,91 @@ jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name )
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
// fix oldIE attroperties
|
// fix oldIE attroperties
|
||||||
if ( !getSetInput ) {
|
if ( !getSetInput || !getSetAttribute ) {
|
||||||
jQuery.attrHooks.value = {
|
jQuery.attrHooks.value = {
|
||||||
set: function( elem, value ) {
|
set: function( elem, value, name ) {
|
||||||
if ( jQuery.nodeName( elem, "input" ) ) {
|
if ( jQuery.nodeName( elem, "input" ) ) {
|
||||||
|
|
||||||
// Does not return so that setAttribute is also used
|
// Does not return so that setAttribute is also used
|
||||||
elem.defaultValue = value;
|
elem.defaultValue = value;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Use nodeHook if defined (#1954); otherwise setAttribute is fine
|
||||||
|
return nodeHook && nodeHook.set( elem, value, name );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IE6/7 do not support getting/setting some attributes with get/setAttribute
|
||||||
|
if ( !getSetAttribute ) {
|
||||||
|
|
||||||
|
// Use this for any attribute in IE6/7
|
||||||
|
// This fixes almost every IE6/7 issue
|
||||||
|
nodeHook = {
|
||||||
|
set: function( elem, value, name ) {
|
||||||
|
|
||||||
|
// Set the existing or create a new attribute node
|
||||||
|
var ret = elem.getAttributeNode( name );
|
||||||
|
if ( !ret ) {
|
||||||
|
elem.setAttributeNode(
|
||||||
|
( ret = elem.ownerDocument.createAttribute( name ) )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret.value = value += "";
|
||||||
|
|
||||||
|
// Break association with cloned elements by also using setAttribute (#9646)
|
||||||
|
if ( name === "value" || value === elem.getAttribute( name ) ) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Some attributes are constructed with empty-string values when not defined
|
||||||
|
attrHandle.id = attrHandle.name = attrHandle.coords =
|
||||||
|
function( elem, name, isXML ) {
|
||||||
|
var ret;
|
||||||
|
if ( !isXML ) {
|
||||||
|
return ( ret = elem.getAttributeNode( name ) ) && ret.value !== "" ?
|
||||||
|
ret.value :
|
||||||
|
null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fixing value retrieval on a button requires this module
|
||||||
|
jQuery.valHooks.button = {
|
||||||
|
get: function( elem, name ) {
|
||||||
|
var ret = elem.getAttributeNode( name );
|
||||||
|
if ( ret && ret.specified ) {
|
||||||
|
return ret.value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
set: nodeHook.set
|
||||||
|
};
|
||||||
|
|
||||||
|
// Set contenteditable to false on removals(#10429)
|
||||||
|
// Setting to empty string throws an error as an invalid value
|
||||||
|
jQuery.attrHooks.contenteditable = {
|
||||||
|
set: function( elem, value, name ) {
|
||||||
|
nodeHook.set( elem, value === "" ? false : value, name );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
|
||||||
|
// This is for removals
|
||||||
|
jQuery.each( [ "width", "height" ], function( i, name ) {
|
||||||
|
jQuery.attrHooks[ name ] = {
|
||||||
|
set: function( elem, value ) {
|
||||||
|
if ( value === "" ) {
|
||||||
|
elem.setAttribute( name, "auto" );
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
if ( !support.style ) {
|
if ( !support.style ) {
|
||||||
jQuery.attrHooks.style = {
|
jQuery.attrHooks.style = {
|
||||||
get: function( elem ) {
|
get: function( elem ) {
|
||||||
|
@ -85,6 +85,23 @@ jQuery.extend( {
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// Some attributes require a special call on IE
|
||||||
|
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
||||||
|
if ( !support.hrefNormalized ) {
|
||||||
|
|
||||||
|
// href/src property should get the full normalized URL (#10299/#12915)
|
||||||
|
jQuery.each( [ "href", "src" ], function( i, name ) {
|
||||||
|
jQuery.propHooks[ name ] = {
|
||||||
|
get: function( elem ) {
|
||||||
|
return elem.getAttribute( name, 4 );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Support: Safari, IE9+
|
||||||
|
// mis-reports the default selected property of an option
|
||||||
|
// Accessing the parent's selectedIndex property fixes it
|
||||||
if ( !support.optSelected ) {
|
if ( !support.optSelected ) {
|
||||||
jQuery.propHooks.selected = {
|
jQuery.propHooks.selected = {
|
||||||
get: function( elem ) {
|
get: function( elem ) {
|
||||||
@ -118,4 +135,9 @@ jQuery.each( [
|
|||||||
jQuery.propFix[ this.toLowerCase() ] = this;
|
jQuery.propFix[ this.toLowerCase() ] = this;
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// IE6/7 call enctype encoding
|
||||||
|
if ( !support.enctype ) {
|
||||||
|
jQuery.propFix.enctype = "encoding";
|
||||||
|
}
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
@ -11,7 +11,10 @@ define( [
|
|||||||
opt = select.appendChild( document.createElement( "option" ) );
|
opt = select.appendChild( document.createElement( "option" ) );
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
div.innerHTML = " <link/><a href='/a'>a</a>";
|
div = document.createElement( "div" );
|
||||||
|
div.setAttribute( "className", "t" );
|
||||||
|
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
||||||
|
a = div.getElementsByTagName( "a" )[ 0 ];
|
||||||
|
|
||||||
// Support: Windows Web Apps (WWA)
|
// Support: Windows Web Apps (WWA)
|
||||||
// `type` must use .setAttribute for WWA (#14901)
|
// `type` must use .setAttribute for WWA (#14901)
|
||||||
@ -23,18 +26,28 @@ define( [
|
|||||||
// First batch of tests.
|
// First batch of tests.
|
||||||
a.style.cssText = "top:1px";
|
a.style.cssText = "top:1px";
|
||||||
|
|
||||||
|
// Test setAttribute on camelCase class.
|
||||||
|
// If it works, we need attrFixes when doing get/setAttribute (ie6/7)
|
||||||
|
support.getSetAttribute = div.className !== "t";
|
||||||
|
|
||||||
// Get the style information from getAttribute
|
// Get the style information from getAttribute
|
||||||
// (IE uses .cssText instead)
|
// (IE uses .cssText instead)
|
||||||
support.style = /top/.test( a.getAttribute( "style" ) );
|
support.style = /top/.test( a.getAttribute( "style" ) );
|
||||||
|
|
||||||
|
// Make sure that URLs aren't manipulated
|
||||||
|
// (IE normalizes it by default)
|
||||||
|
support.hrefNormalized = a.getAttribute( "href" ) === "/a";
|
||||||
|
|
||||||
// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
|
// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
|
||||||
support.checkOn = !!input.value;
|
support.checkOn = !!input.value;
|
||||||
|
|
||||||
// Support: IE8-11+
|
|
||||||
// Make sure that a selected-by-default option has a working selected property.
|
// Make sure that a selected-by-default option has a working selected property.
|
||||||
// (IE defaults to false instead of true if it's in an optgroup)
|
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
|
||||||
support.optSelected = opt.selected;
|
support.optSelected = opt.selected;
|
||||||
|
|
||||||
|
// Tests for enctype support on a form (#6743)
|
||||||
|
support.enctype = !!document.createElement( "form" ).enctype;
|
||||||
|
|
||||||
// Make sure that the options inside disabled selects aren't marked as disabled
|
// Make sure that the options inside disabled selects aren't marked as disabled
|
||||||
// (WebKit marks them as disabled)
|
// (WebKit marks them as disabled)
|
||||||
select.disabled = true;
|
select.disabled = true;
|
||||||
|
@ -78,10 +78,13 @@ jQuery.extend( {
|
|||||||
valHooks: {
|
valHooks: {
|
||||||
option: {
|
option: {
|
||||||
get: function( elem ) {
|
get: function( elem ) {
|
||||||
|
var val = jQuery.find.attr( elem, "value" );
|
||||||
|
return val != null ?
|
||||||
|
val :
|
||||||
|
|
||||||
// Support: IE<11
|
// Support: IE10-11+
|
||||||
// option.value not trimmed (#14858)
|
// option.text throws exceptions (#14686, #14858)
|
||||||
return jQuery.trim( elem.value );
|
jQuery.trim( jQuery.text( elem ) );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
@ -100,8 +103,7 @@ jQuery.extend( {
|
|||||||
for ( ; i < max; i++ ) {
|
for ( ; i < max; i++ ) {
|
||||||
option = options[ i ];
|
option = options[ i ];
|
||||||
|
|
||||||
// Support: IE<10
|
// oldIE doesn't update selected after form reset (#2551)
|
||||||
// IE8-9 doesn't update selected after form reset (#2551)
|
|
||||||
if ( ( option.selected || i === index ) &&
|
if ( ( option.selected || i === index ) &&
|
||||||
|
|
||||||
// Don't return options that are disabled or in a disabled optgroup
|
// Don't return options that are disabled or in a disabled optgroup
|
||||||
@ -135,11 +137,24 @@ jQuery.extend( {
|
|||||||
|
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
option = options[ i ];
|
option = options[ i ];
|
||||||
if (
|
|
||||||
option.selected =
|
if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {
|
||||||
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
|
||||||
) {
|
// Support: IE6
|
||||||
optionSet = true;
|
// When new option element is added to select box we need to
|
||||||
|
// force reflow of newly added node in order to workaround delay
|
||||||
|
// of initialization properties
|
||||||
|
try {
|
||||||
|
option.selected = optionSet = true;
|
||||||
|
|
||||||
|
} catch ( _ ) {
|
||||||
|
|
||||||
|
// Will be executed only in IE6
|
||||||
|
option.scrollHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
option.selected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,6 @@ jQuery.extend( {
|
|||||||
typeof obj;
|
typeof obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Evaluates a script in a global context
|
|
||||||
// Workarounds based on findings by Jim Driscoll
|
// Workarounds based on findings by Jim Driscoll
|
||||||
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
||||||
globalEval: function( data ) {
|
globalEval: function( data ) {
|
||||||
@ -295,11 +294,7 @@ jQuery.extend( {
|
|||||||
// We use an anonymous function so that context is window
|
// We use an anonymous function so that context is window
|
||||||
// rather than jQuery in Firefox
|
// rather than jQuery in Firefox
|
||||||
( window.execScript || function( data ) {
|
( window.execScript || function( data ) {
|
||||||
|
window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation
|
||||||
// jscs:disable
|
|
||||||
window[ "eval" ].call( window, data );
|
|
||||||
// jscs:enable
|
|
||||||
|
|
||||||
} )( data );
|
} )( data );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -28,8 +28,8 @@ var rootjQuery,
|
|||||||
|
|
||||||
// Handle HTML strings
|
// Handle HTML strings
|
||||||
if ( typeof selector === "string" ) {
|
if ( typeof selector === "string" ) {
|
||||||
if ( selector[ 0 ] === "<" &&
|
if ( selector.charAt( 0 ) === "<" &&
|
||||||
selector[ selector.length - 1 ] === ">" &&
|
selector.charAt( selector.length - 1 ) === ">" &&
|
||||||
selector.length >= 3 ) {
|
selector.length >= 3 ) {
|
||||||
|
|
||||||
// Assume that strings that start and end with <> are HTML and skip the regex check
|
// Assume that strings that start and end with <> are HTML and skip the regex check
|
||||||
@ -75,9 +75,17 @@ var rootjQuery,
|
|||||||
} else {
|
} else {
|
||||||
elem = document.getElementById( match[ 2 ] );
|
elem = document.getElementById( match[ 2 ] );
|
||||||
|
|
||||||
if ( elem ) {
|
// Check parentNode to catch when Blackberry 4.6 returns
|
||||||
|
// nodes that are no longer in the document #6963
|
||||||
|
if ( elem && elem.parentNode ) {
|
||||||
|
|
||||||
// Inject the element directly into the jQuery object
|
// Handle the case where IE and Opera return items
|
||||||
|
// by name instead of ID
|
||||||
|
if ( elem.id !== match[ 2 ] ) {
|
||||||
|
return rootjQuery.find( selector );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise, we inject the element directly into the jQuery object
|
||||||
this.length = 1;
|
this.length = 1;
|
||||||
this[ 0 ] = elem;
|
this[ 0 ] = elem;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,6 @@ function detach() {
|
|||||||
document.removeEventListener( "DOMContentLoaded", completed );
|
document.removeEventListener( "DOMContentLoaded", completed );
|
||||||
window.removeEventListener( "load", completed );
|
window.removeEventListener( "load", completed );
|
||||||
|
|
||||||
// Support: IE<9
|
|
||||||
} else {
|
} else {
|
||||||
document.detachEvent( "onreadystatechange", completed );
|
document.detachEvent( "onreadystatechange", completed );
|
||||||
window.detachEvent( "onload", completed );
|
window.detachEvent( "onload", completed );
|
||||||
@ -116,7 +115,6 @@ jQuery.ready.promise = function( obj ) {
|
|||||||
// A fallback to window.onload, that will always work
|
// A fallback to window.onload, that will always work
|
||||||
window.addEventListener( "load", completed );
|
window.addEventListener( "load", completed );
|
||||||
|
|
||||||
// Support: IE<9
|
|
||||||
// If IE event model is used
|
// If IE event model is used
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -125,6 +123,36 @@ jQuery.ready.promise = function( obj ) {
|
|||||||
|
|
||||||
// A fallback to window.onload, that will always work
|
// A fallback to window.onload, that will always work
|
||||||
window.attachEvent( "onload", completed );
|
window.attachEvent( "onload", completed );
|
||||||
|
|
||||||
|
// If IE and not a frame
|
||||||
|
// continually check to see if the document is ready
|
||||||
|
var top = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
top = window.frameElement == null && document.documentElement;
|
||||||
|
} catch ( e ) {}
|
||||||
|
|
||||||
|
if ( top && top.doScroll ) {
|
||||||
|
( function doScrollCheck() {
|
||||||
|
if ( !jQuery.isReady ) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
// Use the trick by Diego Perini
|
||||||
|
// http://javascript.nwbox.com/IEContentLoaded/
|
||||||
|
top.doScroll( "left" );
|
||||||
|
} catch ( e ) {
|
||||||
|
return window.setTimeout( doScrollCheck, 50 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// detach all dom ready events
|
||||||
|
detach();
|
||||||
|
|
||||||
|
// and execute any waiting functions
|
||||||
|
jQuery.ready();
|
||||||
|
}
|
||||||
|
} )();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return readyList.promise( obj );
|
return readyList.promise( obj );
|
||||||
|
13
src/css.js
13
src/css.js
@ -41,7 +41,7 @@ var
|
|||||||
fontWeight: "400"
|
fontWeight: "400"
|
||||||
},
|
},
|
||||||
|
|
||||||
cssPrefixes = [ "Webkit", "Moz", "ms" ],
|
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
|
||||||
emptyStyle = document.createElement( "div" ).style;
|
emptyStyle = document.createElement( "div" ).style;
|
||||||
|
|
||||||
// BuildExclude
|
// BuildExclude
|
||||||
@ -56,7 +56,7 @@ function vendorPropName( name ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for vendor prefixed names
|
// check for vendor prefixed names
|
||||||
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),
|
||||||
i = cssPrefixes.length;
|
i = cssPrefixes.length;
|
||||||
|
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
@ -183,7 +183,8 @@ function getWidthOrHeight( elem, name, extra ) {
|
|||||||
var valueIsBorderBox = true,
|
var valueIsBorderBox = true,
|
||||||
val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
||||||
styles = getStyles( elem ),
|
styles = getStyles( elem ),
|
||||||
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
isBorderBox = support.boxSizing &&
|
||||||
|
jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||||
|
|
||||||
// Support: IE11 only
|
// Support: IE11 only
|
||||||
// In IE 11 fullscreen elements inside of an iframe have
|
// In IE 11 fullscreen elements inside of an iframe have
|
||||||
@ -329,7 +330,7 @@ jQuery.extend( {
|
|||||||
if ( !hooks || !( "set" in hooks ) ||
|
if ( !hooks || !( "set" in hooks ) ||
|
||||||
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
||||||
|
|
||||||
// Support: IE<9
|
// Support: IE
|
||||||
// Swallow errors from 'invalid' CSS values (#5509)
|
// Swallow errors from 'invalid' CSS values (#5509)
|
||||||
try {
|
try {
|
||||||
style[ name ] = value;
|
style[ name ] = value;
|
||||||
@ -409,7 +410,8 @@ jQuery.each( [ "height", "width" ], function( i, name ) {
|
|||||||
elem,
|
elem,
|
||||||
name,
|
name,
|
||||||
extra,
|
extra,
|
||||||
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
support.boxSizing &&
|
||||||
|
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
||||||
styles
|
styles
|
||||||
) : 0
|
) : 0
|
||||||
);
|
);
|
||||||
@ -466,7 +468,6 @@ if ( !support.opacity ) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: Android 2.3
|
|
||||||
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
|
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
|
||||||
function( elem, computed ) {
|
function( elem, computed ) {
|
||||||
if ( computed ) {
|
if ( computed ) {
|
||||||
|
@ -42,9 +42,11 @@ if ( window.getComputedStyle ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A tribute to the "awesome hack by Dean Edwards"
|
// A tribute to the "awesome hack by Dean Edwards"
|
||||||
// Android Browser returns percentage for some values,
|
// Chrome < 17 and Safari 5.0 uses "computed value"
|
||||||
// but width seems to be reliably pixels.
|
// instead of "used value" for margin-right
|
||||||
// This is against the CSSOM draft spec:
|
// Safari 5.1.7 (at least) returns percentage for a larger set of values,
|
||||||
|
// but width seems to be reliably pixels
|
||||||
|
// this is against the CSSOM draft spec:
|
||||||
// http://dev.w3.org/csswg/cssom/#resolved-values
|
// http://dev.w3.org/csswg/cssom/#resolved-values
|
||||||
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
||||||
|
|
||||||
@ -64,7 +66,7 @@ if ( window.getComputedStyle ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: IE9-11+
|
// Support: IE
|
||||||
// IE returns zIndex value as an integer.
|
// IE returns zIndex value as an integer.
|
||||||
return ret === undefined ?
|
return ret === undefined ?
|
||||||
ret :
|
ret :
|
||||||
@ -118,7 +120,7 @@ if ( window.getComputedStyle ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: IE<9
|
// Support: IE
|
||||||
// IE returns zIndex value as an integer.
|
// IE returns zIndex value as an integer.
|
||||||
return ret === undefined ?
|
return ret === undefined ?
|
||||||
ret :
|
ret :
|
||||||
|
@ -36,6 +36,11 @@ define( [
|
|||||||
div.innerHTML = "";
|
div.innerHTML = "";
|
||||||
container.appendChild( div );
|
container.appendChild( div );
|
||||||
|
|
||||||
|
// Support: Firefox<29, Android 2.3
|
||||||
|
// Vendor-prefix box-sizing
|
||||||
|
support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
|
||||||
|
div.style.WebkitBoxSizing === "";
|
||||||
|
|
||||||
jQuery.extend( support, {
|
jQuery.extend( support, {
|
||||||
reliableHiddenOffsets: function() {
|
reliableHiddenOffsets: function() {
|
||||||
if ( pixelPositionVal == null ) {
|
if ( pixelPositionVal == null ) {
|
||||||
@ -133,8 +138,8 @@ define( [
|
|||||||
|
|
||||||
// Support: Android 2.3
|
// Support: Android 2.3
|
||||||
// Vendor-prefix box-sizing
|
// Vendor-prefix box-sizing
|
||||||
"-webkit-box-sizing:content-box;box-sizing:content-box;" +
|
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
|
||||||
"display:block;margin:0;border:0;padding:0";
|
"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
|
||||||
contents.style.marginRight = contents.style.width = "0";
|
contents.style.marginRight = contents.style.width = "0";
|
||||||
div.style.width = "1px";
|
div.style.width = "1px";
|
||||||
|
|
||||||
@ -144,7 +149,7 @@ define( [
|
|||||||
div.removeChild( contents );
|
div.removeChild( contents );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: IE<9
|
// Support: IE8
|
||||||
// Check if table cells still have offsetWidth/Height when they are set
|
// Check if table cells still have offsetWidth/Height when they are set
|
||||||
// to display:none and there are still other visible table cells in a
|
// to display:none and there are still other visible table cells in a
|
||||||
// table row; if so, offsetWidth/Height are not reliable for use when
|
// table row; if so, offsetWidth/Height are not reliable for use when
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
define( function() {
|
define( [
|
||||||
|
"../../core"
|
||||||
|
], function( jQuery ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether an object can have data
|
* Determines whether an object can have data
|
||||||
|
@ -31,7 +31,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
|||||||
|
|
||||||
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
|
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
|
||||||
// whichever is greatest
|
// whichever is greatest
|
||||||
// unfortunately, this causes bug #3838 in IE8 only,
|
// unfortunately, this causes bug #3838 in IE6/8 only,
|
||||||
// but there is currently no good, small way to fix it.
|
// but there is currently no good, small way to fix it.
|
||||||
return Math.max(
|
return Math.max(
|
||||||
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
|
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
|
||||||
|
17
src/effects.js
vendored
17
src/effects.js
vendored
@ -1,22 +1,22 @@
|
|||||||
define( [
|
define( [
|
||||||
"./core",
|
"./core",
|
||||||
"./var/document",
|
"./support",
|
||||||
"./var/rcssNum",
|
"./var/rcssNum",
|
||||||
"./var/rnotwhite",
|
"./var/rnotwhite",
|
||||||
"./css/var/cssExpand",
|
"./css/var/cssExpand",
|
||||||
"./css/var/isHidden",
|
"./css/var/isHidden",
|
||||||
"./css/adjustCSS",
|
"./css/adjustCSS",
|
||||||
"./css/defaultDisplay",
|
"./css/defaultDisplay",
|
||||||
"./var/document",
|
|
||||||
|
|
||||||
|
"./var/document",
|
||||||
"./core/init",
|
"./core/init",
|
||||||
"./effects/Tween",
|
"./effects/Tween",
|
||||||
"./queue",
|
"./queue",
|
||||||
"./css",
|
"./css",
|
||||||
"./deferred",
|
"./deferred",
|
||||||
"./traversing"
|
"./traversing"
|
||||||
], function( jQuery, document, rcssNum, rnotwhite, cssExpand,
|
], function( jQuery, support, rcssNum, rnotwhite,
|
||||||
isHidden, adjustCSS, defaultDisplay ) {
|
cssExpand, isHidden, adjustCSS, defaultDisplay ) {
|
||||||
|
|
||||||
var
|
var
|
||||||
fxNow, timerId,
|
fxNow, timerId,
|
||||||
@ -120,7 +120,14 @@ function defaultPrefilter( elem, props, opts ) {
|
|||||||
jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
|
jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
|
||||||
|
|
||||||
if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
|
if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
|
||||||
style.display = "inline-block";
|
|
||||||
|
// inline-level elements accept inline-block;
|
||||||
|
// block-level elements need to be inline with layout
|
||||||
|
if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
|
||||||
|
style.display = "inline-block";
|
||||||
|
} else {
|
||||||
|
style.zoom = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,9 +411,8 @@ jQuery.event = {
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
// Call a native DOM method on the target with the same name name as the event.
|
// Call a native DOM method on the target with the same name name as the event.
|
||||||
|
// Can't use an .isFunction() check here because IE6/7 fails that test.
|
||||||
// Don't do default actions on window, that's where global variables be (#6170)
|
// Don't do default actions on window, that's where global variables be (#6170)
|
||||||
// Support: IE<9
|
|
||||||
// Can't use an .isFunction() check here because IE8 fails that test.
|
|
||||||
if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
|
if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
|
||||||
|
|
||||||
// Don't re-trigger an onFOO event when we call its FOO() method
|
// Don't re-trigger an onFOO event when we call its FOO() method
|
||||||
@ -763,7 +762,7 @@ jQuery.removeEvent = document.removeEventListener ?
|
|||||||
|
|
||||||
if ( elem.detachEvent ) {
|
if ( elem.detachEvent ) {
|
||||||
|
|
||||||
// #8545, #7054, preventing memory leaks for custom events in IE8
|
// #8545, #7054, preventing memory leaks for custom events in IE6-8
|
||||||
// detachEvent needed property on element, by name of that event,
|
// detachEvent needed property on element, by name of that event,
|
||||||
// to properly expose it to GC
|
// to properly expose it to GC
|
||||||
if ( typeof elem[ name ] === "undefined" ) {
|
if ( typeof elem[ name ] === "undefined" ) {
|
||||||
|
@ -44,6 +44,7 @@ var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
|
|||||||
safeFragment = createSafeFragment( document ),
|
safeFragment = createSafeFragment( document ),
|
||||||
fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) );
|
fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) );
|
||||||
|
|
||||||
|
// Support: IE<8
|
||||||
// Manipulating tables requires a tbody
|
// Manipulating tables requires a tbody
|
||||||
function manipulationTarget( elem, content ) {
|
function manipulationTarget( elem, content ) {
|
||||||
return jQuery.nodeName( elem, "table" ) &&
|
return jQuery.nodeName( elem, "table" ) &&
|
||||||
@ -106,6 +107,7 @@ function fixCloneNodeIssues( src, dest ) {
|
|||||||
|
|
||||||
nodeName = dest.nodeName.toLowerCase();
|
nodeName = dest.nodeName.toLowerCase();
|
||||||
|
|
||||||
|
// IE6-8 copies events bound via attachEvent when using cloneNode.
|
||||||
if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
|
if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
|
||||||
data = jQuery._data( dest );
|
data = jQuery._data( dest );
|
||||||
|
|
||||||
@ -117,26 +119,46 @@ function fixCloneNodeIssues( src, dest ) {
|
|||||||
dest.removeAttribute( jQuery.expando );
|
dest.removeAttribute( jQuery.expando );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support: IE<9
|
|
||||||
// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
|
// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
|
||||||
if ( nodeName === "script" && dest.text !== src.text ) {
|
if ( nodeName === "script" && dest.text !== src.text ) {
|
||||||
disableScript( dest ).text = src.text;
|
disableScript( dest ).text = src.text;
|
||||||
restoreScript( dest );
|
restoreScript( dest );
|
||||||
|
|
||||||
// Support: IE<9
|
// IE6-10 improperly clones children of object elements using classid.
|
||||||
// IE8 fails to persist the checked state of a cloned checkbox
|
// IE10 throws NoModificationAllowedError if parent is null, #12132.
|
||||||
// or radio button.
|
} else if ( nodeName === "object" ) {
|
||||||
} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
if ( dest.parentNode ) {
|
||||||
dest.checked = src.checked;
|
dest.outerHTML = src.outerHTML;
|
||||||
|
}
|
||||||
|
|
||||||
// Support: IE<9
|
// This path appears unavoidable for IE9. When cloning an object
|
||||||
// IE8 fails to return the selected option to the default selected
|
// element in IE9, the outerHTML strategy above is not sufficient.
|
||||||
|
// If the src has innerHTML and the destination does not,
|
||||||
|
// copy the src.innerHTML into the dest.innerHTML. #10324
|
||||||
|
if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {
|
||||||
|
dest.innerHTML = src.innerHTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
||||||
|
|
||||||
|
// IE6-8 fails to persist the checked state of a cloned checkbox
|
||||||
|
// or radio button. Worse, IE6-7 fail to give the cloned element
|
||||||
|
// a checked appearance if the defaultChecked value isn't also set
|
||||||
|
|
||||||
|
dest.defaultChecked = dest.checked = src.checked;
|
||||||
|
|
||||||
|
// IE6-7 get confused and end up setting the value of a cloned
|
||||||
|
// checkbox/radio button to an empty string instead of "on"
|
||||||
|
if ( dest.value !== src.value ) {
|
||||||
|
dest.value = src.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// IE6-8 fails to return the selected option to the default selected
|
||||||
// state when cloning options
|
// state when cloning options
|
||||||
} else if ( nodeName === "option" ) {
|
} else if ( nodeName === "option" ) {
|
||||||
dest.defaultSelected = dest.selected = src.defaultSelected;
|
dest.defaultSelected = dest.selected = src.defaultSelected;
|
||||||
|
|
||||||
// Support: IE<9
|
// IE6-8 fails to set the defaultValue to the correct value when
|
||||||
// IE8 fails to set the defaultValue to the correct value when
|
|
||||||
// cloning other types of input fields
|
// cloning other types of input fields
|
||||||
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
||||||
dest.defaultValue = src.defaultValue;
|
dest.defaultValue = src.defaultValue;
|
||||||
@ -547,8 +569,7 @@ jQuery.each( {
|
|||||||
elems = i === last ? this : this.clone( true );
|
elems = i === last ? this : this.clone( true );
|
||||||
jQuery( insert[ i ] )[ original ]( elems );
|
jQuery( insert[ i ] )[ original ]( elems );
|
||||||
|
|
||||||
// Support: IE<9, Android<4.1, PhantomJS<2
|
// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
|
||||||
// .get() because push.apply(_, arraylike) throws on ancient WebKit
|
|
||||||
push.apply( ret, elems.get() );
|
push.apply( ret, elems.get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
define( [
|
define( [
|
||||||
"../core",
|
"../core",
|
||||||
|
"./var/rcheckableType",
|
||||||
"./var/rtagName",
|
"./var/rtagName",
|
||||||
"./var/rscriptType",
|
"./var/rscriptType",
|
||||||
"./var/rleadingWhitespace",
|
"./var/rleadingWhitespace",
|
||||||
@ -8,18 +9,26 @@ define( [
|
|||||||
"./getAll",
|
"./getAll",
|
||||||
"./setGlobalEval",
|
"./setGlobalEval",
|
||||||
"./support"
|
"./support"
|
||||||
], function( jQuery, rtagName, rscriptType, rleadingWhitespace,
|
], function( jQuery, rcheckableType, rtagName, rscriptType, rleadingWhitespace,
|
||||||
createSafeFragment, wrapMap, getAll, setGlobalEval, support ) {
|
createSafeFragment, wrapMap, getAll, setGlobalEval, support ) {
|
||||||
|
|
||||||
var rhtml = /<|&#?\w+;/;
|
var rhtml = /<|&#?\w+;/,
|
||||||
|
rtbody = /<tbody/i;
|
||||||
|
|
||||||
|
function fixDefaultChecked( elem ) {
|
||||||
|
if ( rcheckableType.test( elem.type ) ) {
|
||||||
|
elem.defaultChecked = elem.checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function buildFragment( elems, context, scripts, selection, ignored ) {
|
function buildFragment( elems, context, scripts, selection, ignored ) {
|
||||||
var j, elem, contains,
|
var j, elem, contains,
|
||||||
tmp, tag, wrap,
|
tmp, tag, tbody, wrap,
|
||||||
l = elems.length,
|
l = elems.length,
|
||||||
|
|
||||||
// Ensure a safe fragment
|
// Ensure a safe fragment
|
||||||
safe = createSafeFragment( context ),
|
safe = createSafeFragment( context ),
|
||||||
|
|
||||||
nodes = [],
|
nodes = [],
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
@ -43,6 +52,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||||||
// Deserialize a standard representation
|
// Deserialize a standard representation
|
||||||
tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
|
tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
|
||||||
wrap = wrapMap[ tag ] || wrapMap._default;
|
wrap = wrapMap[ tag ] || wrapMap._default;
|
||||||
|
|
||||||
tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
|
tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
|
||||||
|
|
||||||
// Descend through wrappers to the right content
|
// Descend through wrappers to the right content
|
||||||
@ -56,6 +66,28 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||||||
nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );
|
nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove IE's autoinserted <tbody> from table fragments
|
||||||
|
if ( !support.tbody ) {
|
||||||
|
|
||||||
|
// String was a <table>, *may* have spurious <tbody>
|
||||||
|
elem = tag === "table" && !rtbody.test( elem ) ?
|
||||||
|
tmp.firstChild :
|
||||||
|
|
||||||
|
// String was a bare <thead> or <tfoot>
|
||||||
|
wrap[ 1 ] === "<table>" && !rtbody.test( elem ) ?
|
||||||
|
tmp :
|
||||||
|
0;
|
||||||
|
|
||||||
|
j = elem && elem.childNodes.length;
|
||||||
|
while ( j-- ) {
|
||||||
|
if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
|
||||||
|
!tbody.childNodes.length ) {
|
||||||
|
|
||||||
|
elem.removeChild( tbody );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.merge( nodes, tmp.childNodes );
|
jQuery.merge( nodes, tmp.childNodes );
|
||||||
|
|
||||||
// Fix #12392 for WebKit and IE > 9
|
// Fix #12392 for WebKit and IE > 9
|
||||||
@ -77,6 +109,12 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||||||
safe.removeChild( tmp );
|
safe.removeChild( tmp );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset defaultChecked for any radios and checkboxes
|
||||||
|
// about to be appended to the DOM in IE 6/7 (#8060)
|
||||||
|
if ( !support.appendChecked ) {
|
||||||
|
jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
|
||||||
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while ( ( elem = nodes[ i++ ] ) ) {
|
while ( ( elem = nodes[ i++ ] ) ) {
|
||||||
|
|
||||||
@ -85,6 +123,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||||||
if ( ignored ) {
|
if ( ignored ) {
|
||||||
ignored.push( elem );
|
ignored.push( elem );
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,11 +10,15 @@ define( [
|
|||||||
input = document.createElement( "input" );
|
input = document.createElement( "input" );
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
div.innerHTML = " <link/><a href='/a'></a>";
|
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
||||||
|
|
||||||
// IE strips leading whitespace when .innerHTML is used
|
// IE strips leading whitespace when .innerHTML is used
|
||||||
support.leadingWhitespace = div.firstChild.nodeType === 3;
|
support.leadingWhitespace = div.firstChild.nodeType === 3;
|
||||||
|
|
||||||
|
// Make sure that tbody elements aren't automatically inserted
|
||||||
|
// IE will insert them into empty tables
|
||||||
|
support.tbody = !div.getElementsByTagName( "tbody" ).length;
|
||||||
|
|
||||||
// Make sure that link elements get serialized correctly by innerHTML
|
// Make sure that link elements get serialized correctly by innerHTML
|
||||||
// This requires a wrapper element in IE
|
// This requires a wrapper element in IE
|
||||||
support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
|
support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
|
||||||
@ -24,8 +28,15 @@ define( [
|
|||||||
support.html5Clone =
|
support.html5Clone =
|
||||||
document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
|
document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
|
||||||
|
|
||||||
|
// Check if a disconnected checkbox will retain its checked
|
||||||
|
// value of true after appended to the DOM (IE6/7)
|
||||||
|
input.type = "checkbox";
|
||||||
|
input.checked = true;
|
||||||
|
fragment.appendChild( input );
|
||||||
|
support.appendChecked = input.checked;
|
||||||
|
|
||||||
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
||||||
// Support: IE8-IE11+
|
// Support: IE6-IE11+
|
||||||
div.innerHTML = "<textarea>x</textarea>";
|
div.innerHTML = "<textarea>x</textarea>";
|
||||||
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
||||||
|
|
||||||
@ -34,14 +45,15 @@ define( [
|
|||||||
|
|
||||||
// Support: Windows Web Apps (WWA)
|
// Support: Windows Web Apps (WWA)
|
||||||
// `name` and `type` must use .setAttribute for WWA (#14901)
|
// `name` and `type` must use .setAttribute for WWA (#14901)
|
||||||
|
input = document.createElement( "input" );
|
||||||
input.setAttribute( "type", "radio" );
|
input.setAttribute( "type", "radio" );
|
||||||
input.setAttribute( "checked", "checked" );
|
input.setAttribute( "checked", "checked" );
|
||||||
input.setAttribute( "name", "t" );
|
input.setAttribute( "name", "t" );
|
||||||
|
|
||||||
div.appendChild( input );
|
div.appendChild( input );
|
||||||
|
|
||||||
// Support: Android<4.2
|
// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
|
||||||
// Older WebKit doesn't clone checked state correctly in fragments
|
// old WebKit doesn't clone checked state correctly in fragments
|
||||||
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
||||||
|
|
||||||
// Support: IE<9
|
// Support: IE<9
|
||||||
|
@ -7,13 +7,15 @@ var wrapMap = {
|
|||||||
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
||||||
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
||||||
area: [ 1, "<map>", "</map>" ],
|
area: [ 1, "<map>", "</map>" ],
|
||||||
|
|
||||||
|
// Support: IE8
|
||||||
param: [ 1, "<object>", "</object>" ],
|
param: [ 1, "<object>", "</object>" ],
|
||||||
thead: [ 1, "<table>", "</table>" ],
|
thead: [ 1, "<table>", "</table>" ],
|
||||||
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
||||||
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
|
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
|
||||||
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
||||||
|
|
||||||
// IE8 can't serialize link, script, style, or any html5 (NoScope) tags,
|
// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
|
||||||
// unless wrapped in a div with non-breaking characters in front of it.
|
// unless wrapped in a div with non-breaking characters in front of it.
|
||||||
_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
|
_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
|
||||||
};
|
};
|
||||||
|
@ -105,7 +105,11 @@ jQuery.fn.extend( {
|
|||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
box = elem.getBoundingClientRect();
|
// If we don't have gBCR, just use 0,0 rather than error
|
||||||
|
// BlackBerry 5, iOS 3 (original iPhone)
|
||||||
|
if ( typeof elem.getBoundingClientRect !== "undefined" ) {
|
||||||
|
box = elem.getBoundingClientRect();
|
||||||
|
}
|
||||||
win = getWindow( doc );
|
win = getWindow( doc );
|
||||||
return {
|
return {
|
||||||
top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
|
top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
define( [
|
define( [
|
||||||
"./core",
|
"./core",
|
||||||
"./var/support",
|
"./var/support",
|
||||||
|
"./var/document",
|
||||||
"./core/init", // Needed for hasOwn support test
|
"./core/init", // Needed for hasOwn support test
|
||||||
// This is listed as a dependency for build order, but it's still optional in builds
|
// This is listed as a dependency for build order, but it's still optional in builds
|
||||||
"./core/ready"
|
"./core/ready"
|
||||||
], function( jQuery, support ) {
|
], function( jQuery, support, document ) {
|
||||||
|
|
||||||
// Support: IE<9
|
// Support: IE<9
|
||||||
// Iteration over object's inherited properties before its own
|
// Iteration over object's inherited properties before its own
|
||||||
@ -15,5 +16,48 @@ for ( i in jQuery( support ) ) {
|
|||||||
support.ownFirst = i === "0";
|
support.ownFirst = i === "0";
|
||||||
|
|
||||||
// Note: most support tests are defined in their respective modules.
|
// Note: most support tests are defined in their respective modules.
|
||||||
|
// false until the test is run
|
||||||
|
support.inlineBlockNeedsLayout = false;
|
||||||
|
|
||||||
|
// Execute ASAP in case we need to set body.style.zoom
|
||||||
|
jQuery( function() {
|
||||||
|
|
||||||
|
// Minified: var a,b,c,d
|
||||||
|
var val, div, body, container;
|
||||||
|
|
||||||
|
body = document.getElementsByTagName( "body" )[ 0 ];
|
||||||
|
if ( !body || !body.style ) {
|
||||||
|
|
||||||
|
// Return for frameset docs that don't have a body
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup
|
||||||
|
div = document.createElement( "div" );
|
||||||
|
container = document.createElement( "div" );
|
||||||
|
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
|
||||||
|
body.appendChild( container ).appendChild( div );
|
||||||
|
|
||||||
|
if ( typeof div.style.zoom !== "undefined" ) {
|
||||||
|
|
||||||
|
// Support: IE<8
|
||||||
|
// Check if natively block-level elements act like inline-block
|
||||||
|
// elements when setting their display to 'inline' and giving
|
||||||
|
// them layout
|
||||||
|
div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
|
||||||
|
|
||||||
|
support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
|
||||||
|
if ( val ) {
|
||||||
|
|
||||||
|
// Prevent IE 6 from affecting layout for positioned elements #11048
|
||||||
|
// Prevent IE from shrinking the body in IE 7 mode #12869
|
||||||
|
// Support: IE<8
|
||||||
|
body.style.zoom = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body.removeChild( container );
|
||||||
|
} );
|
||||||
|
|
||||||
|
return support;
|
||||||
} );
|
} );
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<style>
|
<style>
|
||||||
#test {
|
#test {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
@ -2,6 +2,16 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
/**
|
||||||
|
* we need to null out border-width, because it causes bug #3838
|
||||||
|
* and until we drop IE6, this test will fail in IE6 if we didn't
|
||||||
|
* special case this situation.
|
||||||
|
**/
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* for testing opacity set in styles in IE */
|
/* for testing opacity set in styles in IE */
|
||||||
ol#empty {
|
ol#empty {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-ms-filter: "Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff')";
|
filter:Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff');
|
||||||
}
|
}
|
||||||
|
|
||||||
div#fx-tests h4 {
|
div#fx-tests h4 {
|
||||||
@ -47,7 +47,7 @@ div.largeheight {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.largeopacity {
|
div.largeopacity {
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
|
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.medwidth {
|
div.medwidth {
|
||||||
@ -60,7 +60,7 @@ div.medheight {
|
|||||||
|
|
||||||
div.medopacity {
|
div.medopacity {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=50)";
|
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.nowidth {
|
div.nowidth {
|
||||||
@ -73,7 +73,7 @@ div.noheight {
|
|||||||
|
|
||||||
div.noopacity {
|
div.noopacity {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
|
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.hidden {
|
div.hidden {
|
||||||
@ -143,8 +143,8 @@ dfn { display: none; }
|
|||||||
/* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */
|
/* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */
|
||||||
body, div { background: url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif) no-repeat -1000px 0; }
|
body, div { background: url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif) no-repeat -1000px 0; }
|
||||||
|
|
||||||
/* #6652 Remove -ms-filter: "alpha(opacity=100)" after animation */
|
/* #6652 REMOVE FILTER:ALPHA(OPACITY=100) AFTER ANIMATION */
|
||||||
#t6652 div { -ms-filter: "alpha(opacity=50)"; }
|
#t6652 div { filter: alpha(opacity=50); }
|
||||||
|
|
||||||
/* #10501 */
|
/* #10501 */
|
||||||
section { background:#f0f; display:block; }
|
section { background:#f0f; display:block; }
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
var isIE8 = /msie 8\.0/i.test( window.navigator.userAgent );
|
var isoldIE = /msie [876]\.0/i.test( window.navigator.userAgent );
|
||||||
|
|
||||||
QUnit.module( "ajax", {
|
QUnit.module( "ajax", {
|
||||||
setup: function() {
|
setup: function() {
|
||||||
if ( !isIE8 ) {
|
if ( !isoldIE ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ QUnit.module( "ajax", {
|
|||||||
);
|
);
|
||||||
|
|
||||||
ajaxTest( "jQuery.ajax() - success callbacks", 8, function( assert ) {
|
ajaxTest( "jQuery.ajax() - success callbacks", 8, function( assert ) {
|
||||||
return {
|
return {
|
||||||
setup: addGlobalEvents( "ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess", assert ),
|
setup: addGlobalEvents( "ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess", assert ),
|
||||||
url: url( "data/name.html" ),
|
url: url( "data/name.html" ),
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
@ -820,7 +820,7 @@ QUnit.module( "ajax", {
|
|||||||
"jsonpCallback option is set back to default in callbacks"
|
"jsonpCallback option is set back to default in callbacks"
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( isIE8 ) {
|
if ( isoldIE ) {
|
||||||
assert.ok( true, "IE8 can't remove property from the window" );
|
assert.ok( true, "IE8 can't remove property from the window" );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -1417,8 +1417,8 @@ QUnit.module( "ajax", {
|
|||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "#11743 - jQuery.ajax() - script, throws exception", 1, function() {
|
QUnit.test( "#11743 - jQuery.ajax() - script, throws exception", 1, function(assert) {
|
||||||
throws( function() {
|
assert.throws( function() {
|
||||||
jQuery.ajax( {
|
jQuery.ajax( {
|
||||||
url: "data/badjson.js",
|
url: "data/badjson.js",
|
||||||
dataType: "script",
|
dataType: "script",
|
||||||
@ -1430,10 +1430,10 @@ QUnit.module( "ajax", {
|
|||||||
// Global events get confused by the exception
|
// Global events get confused by the exception
|
||||||
global: false,
|
global: false,
|
||||||
success: function() {
|
success: function() {
|
||||||
ok( false, "Success." );
|
assert.ok( false, "Success." );
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
ok( false, "Error." );
|
assert.ok( false, "Error." );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}, "exception bubbled" );
|
}, "exception bubbled" );
|
||||||
@ -1656,7 +1656,7 @@ QUnit.module( "ajax", {
|
|||||||
url: url( "data/ajax/content-type.php" ),
|
url: url( "data/ajax/content-type.php" ),
|
||||||
data: {
|
data: {
|
||||||
"content-type": "test/jsontest",
|
"content-type": "test/jsontest",
|
||||||
"response": JSON.stringify( { test: "test" } )
|
"response": "{ \"test\": \"test\" }"
|
||||||
},
|
},
|
||||||
success: function( result ) {
|
success: function( result ) {
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
|
@ -46,7 +46,11 @@ QUnit.test( "jQuery.propFix integrity test", function( assert ) {
|
|||||||
"contenteditable": "contentEditable"
|
"contenteditable": "contentEditable"
|
||||||
};
|
};
|
||||||
|
|
||||||
assert.deepEqual( props, jQuery.propFix, "jQuery.propFix passes integrity check" );
|
if ( !jQuery.support.enctype ) {
|
||||||
|
props.enctype = "encoding";
|
||||||
|
}
|
||||||
|
|
||||||
|
deepEqual( props, jQuery.propFix, "jQuery.propFix passes integrity check" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "attr(String)", function( assert ) {
|
QUnit.test( "attr(String)", function( assert ) {
|
||||||
@ -588,11 +592,12 @@ QUnit.test( "removeAttr(String)", function( assert ) {
|
|||||||
assert.ok( false, "Removing contenteditable threw an error (#10429)" );
|
assert.ok( false, "Removing contenteditable threw an error (#10429)" );
|
||||||
}
|
}
|
||||||
|
|
||||||
$first = jQuery( "<div Case='mixed'></div>" );
|
$first = jQuery("<div Case='mixed'></div>");
|
||||||
assert.equal( $first.attr( "Case" ), "mixed", "case of attribute doesn't matter" );
|
equal( $first.attr("Case"), "mixed", "case of attribute doesn't matter" );
|
||||||
$first.removeAttr( "Case" );
|
$first.removeAttr("Case");
|
||||||
assert.equal( $first.attr( "Case" ), undefined, "mixed-case attribute was removed" );
|
// IE 6/7 return empty string here, not undefined
|
||||||
} );
|
ok( !$first.attr("Case"), "mixed-case attribute was removed" );
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test( "removeAttr(String) in XML", function( assert ) {
|
QUnit.test( "removeAttr(String) in XML", function( assert ) {
|
||||||
assert.expect( 7 );
|
assert.expect( 7 );
|
||||||
|
@ -1541,7 +1541,7 @@ QUnit.test("jQuery.parseHTML", function( assert ) {
|
|||||||
assert.equal( jQuery.parseHTML( "<td><td>" )[ 1 ].parentNode.nodeType, 11, "parentNode should be documentFragment" );
|
assert.equal( jQuery.parseHTML( "<td><td>" )[ 1 ].parentNode.nodeType, 11, "parentNode should be documentFragment" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
if ( jQuery.support.createHTMLDocument ) {
|
if ( jQuery.support.createHTMLDocument && !/opera.*version\/12\.1/i.test( navigator.userAgent ) ) {
|
||||||
QUnit.asyncTest( "jQuery.parseHTML", function( assert ) {
|
QUnit.asyncTest( "jQuery.parseHTML", function( assert ) {
|
||||||
assert.expect( 1 );
|
assert.expect( 1 );
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ QUnit.test( "css() explicit and relative values", function( assert ) {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "css() non-px relative values (gh-1711)", function( assert ) {
|
QUnit.test( "css() non-px relative values (gh-1711)", function( assert ) {
|
||||||
assert.expect( 17 );
|
assert.expect( 16 );
|
||||||
|
|
||||||
var cssCurrent,
|
var cssCurrent,
|
||||||
units = {},
|
units = {},
|
||||||
@ -271,7 +271,10 @@ QUnit.test( "css() non-px relative values (gh-1711)", function( assert ) {
|
|||||||
add( "lineHeight", 30, "pc" );
|
add( "lineHeight", 30, "pc" );
|
||||||
add( "lineHeight", 1, "cm" );
|
add( "lineHeight", 1, "cm" );
|
||||||
add( "lineHeight", -20, "mm" );
|
add( "lineHeight", -20, "mm" );
|
||||||
add( "lineHeight", 50, "%" );
|
|
||||||
|
// Opera 12 does something funky for this one
|
||||||
|
// Just disabling for 1.12
|
||||||
|
// add( "lineHeight", 50, "%" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "css(String, Object)", function( assert ) {
|
QUnit.test( "css(String, Object)", function( assert ) {
|
||||||
@ -530,7 +533,7 @@ QUnit.test( "show();", function( assert ) {
|
|||||||
|
|
||||||
assert.expect( 18 );
|
assert.expect( 18 );
|
||||||
|
|
||||||
var hiddendiv, div, pass, test;
|
var hiddendiv, div, pass, old, test;
|
||||||
hiddendiv = jQuery( "div.hidden" );
|
hiddendiv = jQuery( "div.hidden" );
|
||||||
|
|
||||||
assert.equal( jQuery.css( hiddendiv[ 0 ], "display" ), "none", "hiddendiv is display: none" );
|
assert.equal( jQuery.css( hiddendiv[ 0 ], "display" ), "none", "hiddendiv is display: none" );
|
||||||
@ -553,7 +556,9 @@ QUnit.test( "show();", function( assert ) {
|
|||||||
assert.ok( pass, "Show" );
|
assert.ok( pass, "Show" );
|
||||||
|
|
||||||
// #show-tests * is set display: none in CSS
|
// #show-tests * is set display: none in CSS
|
||||||
jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>" );
|
jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div><table id='test-table'></table>" );
|
||||||
|
old = jQuery( "#test-table" ).show().css( "display" ) !== "table";
|
||||||
|
jQuery( "#test-table" ).remove();
|
||||||
|
|
||||||
test = {
|
test = {
|
||||||
"div": "block",
|
"div": "block",
|
||||||
@ -562,14 +567,14 @@ QUnit.test( "show();", function( assert ) {
|
|||||||
"code": "inline",
|
"code": "inline",
|
||||||
"pre": "block",
|
"pre": "block",
|
||||||
"span": "inline",
|
"span": "inline",
|
||||||
"table": "table",
|
"table": old ? "block" : "table",
|
||||||
"thead": "table-header-group",
|
"thead": old ? "block" : "table-header-group",
|
||||||
"tbody": "table-row-group",
|
"tbody": old ? "block" : "table-row-group",
|
||||||
"tr": "table-row",
|
"tr": old ? "block" : "table-row",
|
||||||
"th": "table-cell",
|
"th": old ? "block" : "table-cell",
|
||||||
"td": "table-cell",
|
"td": old ? "block" : "table-cell",
|
||||||
"ul": "block",
|
"ul": "block",
|
||||||
"li": "list-item"
|
"li": old ? "block" : "list-item"
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.each( test, function( selector, expected ) {
|
jQuery.each( test, function( selector, expected ) {
|
||||||
@ -1021,13 +1026,13 @@ QUnit.test( "css opacity consistency across browsers (#12685)", function( assert
|
|||||||
fixture = jQuery( "#qunit-fixture" );
|
fixture = jQuery( "#qunit-fixture" );
|
||||||
|
|
||||||
// Append style element
|
// Append style element
|
||||||
jQuery( "<style>.opacityWithSpaces_t12685 { opacity: 0.1; -ms-filter: 'alpha(opacity = 10)'; } .opacityNoSpaces_t12685 { opacity: 0.2; -ms-filter: 'alpha(opacity=20)'; }</style>" ).appendTo( fixture );
|
jQuery( "<style>.opacityWithSpaces_t12685 { opacity: 0.1; filter: alpha(opacity = 10); } .opacityNoSpaces_t12685 { opacity: 0.2; filter: alpha(opacity=20); }</style>" ).appendTo( fixture );
|
||||||
|
|
||||||
el = jQuery( "<div class='opacityWithSpaces_t12685'></div>" ).appendTo( fixture );
|
el = jQuery( "<div class='opacityWithSpaces_t12685'></div>" ).appendTo( fixture );
|
||||||
|
|
||||||
assert.equal( Math.round( el.css( "opacity" ) * 100 ), 10, "opacity from style sheet (-ms-filter:alpha with spaces)" );
|
assert.equal( Math.round( el.css( "opacity" ) * 100 ), 10, "opacity from style sheet (filter:alpha with spaces)" );
|
||||||
el.removeClass( "opacityWithSpaces_t12685" ).addClass( "opacityNoSpaces_t12685" );
|
el.removeClass( "opacityWithSpaces_t12685" ).addClass( "opacityNoSpaces_t12685" );
|
||||||
assert.equal( Math.round( el.css( "opacity" ) * 100 ), 20, "opacity from style sheet (-ms-filter:alpha without spaces)" );
|
assert.equal( Math.round( el.css( "opacity" ) * 100 ), 20, "opacity from style sheet (filter:alpha without spaces)" );
|
||||||
el.css( "opacity", 0.3 );
|
el.css( "opacity", 0.3 );
|
||||||
assert.equal( Math.round( el.css( "opacity" ) * 100 ), 30, "override opacity" );
|
assert.equal( Math.round( el.css( "opacity" ) * 100 ), 30, "override opacity" );
|
||||||
el.css( "opacity", "" );
|
el.css( "opacity", "" );
|
||||||
@ -1275,7 +1280,7 @@ QUnit.test( "Do not throw on frame elements from css method (#15098)", function(
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "get upper case alpha opacity in IE8", function( assert ) {
|
QUnit[/msie 8\.0/.test(navigator.userAgent) ? "test" : "skip"]( "get upper case alpha opacity in IE8", function( assert ) {
|
||||||
assert.expect( 1 );
|
assert.expect( 1 );
|
||||||
|
|
||||||
var div = document.createElement( "div" ),
|
var div = document.createElement( "div" ),
|
||||||
@ -1295,7 +1300,7 @@ QUnit.test( "get upper case alpha opacity in IE8", function( assert ) {
|
|||||||
function resetCssPropsFor( name ) {
|
function resetCssPropsFor( name ) {
|
||||||
delete jQuery.cssProps[ name ];
|
delete jQuery.cssProps[ name ];
|
||||||
jQuery.each( vendorPrefixes, function( index, prefix ) {
|
jQuery.each( vendorPrefixes, function( index, prefix ) {
|
||||||
delete jQuery.cssProps[ prefix + name[ 0 ].toUpperCase() + name.slice( 1 ) ];
|
delete jQuery.cssProps[ prefix + name.charAt( 0 ).toUpperCase() + name.slice( 1 ) ];
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
354
test/unit/effects.js
vendored
354
test/unit/effects.js
vendored
@ -24,7 +24,7 @@ QUnit.test( "sanity check", function( assert ) {
|
|||||||
assert.equal( jQuery( "#dl:visible, #qunit-fixture:visible, #foo:visible" ).length, 3, "QUnit state is correct for testing effects" );
|
assert.equal( jQuery( "#dl:visible, #qunit-fixture:visible, #foo:visible" ).length, 3, "QUnit state is correct for testing effects" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "show() basic", 2, function() {
|
QUnit.test( "show() basic", 2, function() {
|
||||||
var div,
|
var div,
|
||||||
hiddendiv = jQuery( "div.hidden" );
|
hiddendiv = jQuery( "div.hidden" );
|
||||||
|
|
||||||
@ -42,8 +42,8 @@ test( "show() basic", 2, function() {
|
|||||||
QUnit.expectJqData( this, hiddendiv, "olddisplay" );
|
QUnit.expectJqData( this, hiddendiv, "olddisplay" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "show()", 27, function() {
|
QUnit.test( "show()", 27, function() {
|
||||||
var div, speeds, test,
|
var div, speeds, test, old,
|
||||||
displaysActual, displaysExpected,
|
displaysActual, displaysExpected,
|
||||||
hiddendiv = jQuery( "div.hidden" );
|
hiddendiv = jQuery( "div.hidden" );
|
||||||
|
|
||||||
@ -93,7 +93,11 @@ test( "show()", 27, function() {
|
|||||||
QUnit.expectJqData( this, div, "olddisplay" );
|
QUnit.expectJqData( this, div, "olddisplay" );
|
||||||
|
|
||||||
// #show-tests * is set display: none in CSS
|
// #show-tests * is set display: none in CSS
|
||||||
jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>" );
|
jQuery( "#qunit-fixture" )
|
||||||
|
.append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div><table id='test-table'></table>" );
|
||||||
|
|
||||||
|
old = jQuery( "#test-table" ).show().css( "display" ) !== "table";
|
||||||
|
jQuery( "#test-table" ).remove();
|
||||||
|
|
||||||
test = {
|
test = {
|
||||||
"div": "block",
|
"div": "block",
|
||||||
@ -102,14 +106,14 @@ test( "show()", 27, function() {
|
|||||||
"code": "inline",
|
"code": "inline",
|
||||||
"pre": "block",
|
"pre": "block",
|
||||||
"span": "inline",
|
"span": "inline",
|
||||||
"table": "table",
|
"table": old ? "block" : "table",
|
||||||
"thead": "table-header-group",
|
"thead": old ? "block" : "table-header-group",
|
||||||
"tbody": "table-row-group",
|
"tbody": old ? "block" : "table-row-group",
|
||||||
"tr": "table-row",
|
"tr": old ? "block" : "table-row",
|
||||||
"th": "table-cell",
|
"th": old ? "block" : "table-cell",
|
||||||
"td": "table-cell",
|
"td": old ? "block" : "table-cell",
|
||||||
"ul": "block",
|
"ul": "block",
|
||||||
"li": "list-item"
|
"li": old ? "block" : "list-item"
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.each( test, function( selector, expected ) {
|
jQuery.each( test, function( selector, expected ) {
|
||||||
@ -124,31 +128,35 @@ test( "show()", 27, function() {
|
|||||||
jQuery( "<div>test</div> text <span>test</span>" ).hide().remove();
|
jQuery( "<div>test</div> text <span>test</span>" ).hide().remove();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "show(Number) - other displays", function() {
|
QUnit.test( "show(Number) - other displays", function() {
|
||||||
expect( 15 );
|
expect( 15 );
|
||||||
|
|
||||||
// #show-tests * is set display: none in CSS
|
// #show-tests * is set display: none in CSS
|
||||||
jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>" );
|
jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div><table id='test-table'></table>" );
|
||||||
|
|
||||||
|
var test,
|
||||||
|
old = jQuery("#test-table").show().css("display") !== "table";
|
||||||
|
jQuery("#test-table").remove();
|
||||||
|
|
||||||
// Note: inline elements are expected to be inline-block
|
// Note: inline elements are expected to be inline-block
|
||||||
// because we're showing width/height
|
// because we're showing width/height
|
||||||
// Can't animate width/height inline
|
// Can't animate width/height inline
|
||||||
// See #14344
|
// See #14344
|
||||||
var test = {
|
test = {
|
||||||
"div": "block",
|
"div": "block",
|
||||||
"p": "block",
|
"p": "block",
|
||||||
"a": "inline-block",
|
"a": "inline-block",
|
||||||
"code": "inline-block",
|
"code": "inline-block",
|
||||||
"pre": "block",
|
"pre": "block",
|
||||||
"span": "inline-block",
|
"span": "inline-block",
|
||||||
"table": "table",
|
"table": old ? "block" : "table",
|
||||||
"thead": "table-header-group",
|
"thead": old ? "block" : "table-header-group",
|
||||||
"tbody": "table-row-group",
|
"tbody": old ? "block" : "table-row-group",
|
||||||
"tr": "table-row",
|
"tr": old ? "block" : "table-row",
|
||||||
"th": "table-cell",
|
"th": old ? "block" : "table-cell",
|
||||||
"td": "table-cell",
|
"td": old ? "block" : "table-cell",
|
||||||
"ul": "block",
|
"ul": "block",
|
||||||
"li": "list-item"
|
"li": old ? "block" : "list-item"
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.each( test, function( selector, expected ) {
|
jQuery.each( test, function( selector, expected ) {
|
||||||
@ -162,7 +170,7 @@ test( "show(Number) - other displays", function() {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
// Supports #7397
|
// Supports #7397
|
||||||
test( "Persist correct display value", function() {
|
QUnit.test( "Persist correct display value", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
|
||||||
// #show-tests * is set display: none in CSS
|
// #show-tests * is set display: none in CSS
|
||||||
@ -194,7 +202,7 @@ test( "Persist correct display value", function() {
|
|||||||
QUnit.expectJqData( this, $span, "olddisplay" );
|
QUnit.expectJqData( this, $span, "olddisplay" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate(Hash, Object, Function)", function() {
|
QUnit.test( "animate(Hash, Object, Function)", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
var hash = { opacity: "show" },
|
var hash = { opacity: "show" },
|
||||||
hashCopy = jQuery.extend( {}, hash );
|
hashCopy = jQuery.extend( {}, hash );
|
||||||
@ -203,7 +211,7 @@ test( "animate(Hash, Object, Function)", function() {
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate relative values", function() {
|
QUnit.test( "animate relative values", function() {
|
||||||
|
|
||||||
var value = 40,
|
var value = 40,
|
||||||
clock = this.clock,
|
clock = this.clock,
|
||||||
@ -242,7 +250,7 @@ test( "animate relative values", function() {
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate negative height", function() {
|
QUnit.test( "animate negative height", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
jQuery( "#foo" ).animate( { height: -100 }, 100, function() {
|
jQuery( "#foo" ).animate( { height: -100 }, 100, function() {
|
||||||
equal( this.offsetHeight, 0, "Verify height." );
|
equal( this.offsetHeight, 0, "Verify height." );
|
||||||
@ -250,7 +258,7 @@ test( "animate negative height", function() {
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate negative margin", function() {
|
QUnit.test( "animate negative margin", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
jQuery( "#foo" ).animate( { "marginTop": -100 }, 100, function() {
|
jQuery( "#foo" ).animate( { "marginTop": -100 }, 100, function() {
|
||||||
equal( jQuery( this ).css( "marginTop" ), "-100px", "Verify margin." );
|
equal( jQuery( this ).css( "marginTop" ), "-100px", "Verify margin." );
|
||||||
@ -258,7 +266,7 @@ test( "animate negative margin", function() {
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate negative margin with px", function() {
|
QUnit.test( "animate negative margin with px", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
jQuery( "#foo" ).animate( { marginTop: "-100px" }, 100, function() {
|
jQuery( "#foo" ).animate( { marginTop: "-100px" }, 100, function() {
|
||||||
equal( jQuery( this ).css( "marginTop" ), "-100px", "Verify margin." );
|
equal( jQuery( this ).css( "marginTop" ), "-100px", "Verify margin." );
|
||||||
@ -266,7 +274,7 @@ test( "animate negative margin with px", function() {
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate negative padding", function() {
|
QUnit.test( "animate negative padding", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
jQuery( "#foo" ).animate( { "paddingBottom": -100 }, 100, function() {
|
jQuery( "#foo" ).animate( { "paddingBottom": -100 }, 100, function() {
|
||||||
equal( jQuery( this ).css( "paddingBottom" ), "0px", "Verify paddingBottom." );
|
equal( jQuery( this ).css( "paddingBottom" ), "0px", "Verify paddingBottom." );
|
||||||
@ -274,42 +282,59 @@ test( "animate negative padding", function() {
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate block as inline width/height", function() {
|
QUnit.test( "animate block as inline width/height", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
|
||||||
var span = jQuery( "<span>" ).css( "display", "inline-block" ).appendTo( "body" );
|
var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
|
||||||
|
expected = span.css("display");
|
||||||
|
|
||||||
span.remove();
|
span.remove();
|
||||||
|
|
||||||
jQuery( "#foo" ).css( { display: "inline", width: "", height: "" } ).animate( { width: 42, height: 42 }, 100, function() {
|
if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) {
|
||||||
equal( jQuery( this ).css( "display" ), "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
|
|
||||||
equal( this.offsetWidth, 42, "width was animated" );
|
|
||||||
equal( this.offsetHeight, 42, "height was animated" );
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
jQuery("#foo").css({ display: "inline", width: "", height: "" }).animate({ width: 42, height: 42 }, 100, function() {
|
||||||
|
equal( jQuery(this).css("display"), jQuery.support.inlineBlockNeedsLayout ? "inline" : "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
|
||||||
|
equal( this.offsetWidth, 42, "width was animated" );
|
||||||
|
equal( this.offsetHeight, 42, "height was animated" );
|
||||||
|
});
|
||||||
|
|
||||||
|
// Browser doesn't support inline-block
|
||||||
|
} else {
|
||||||
|
ok( true, "Browser doesn't support inline-block" );
|
||||||
|
ok( true, "Browser doesn't support inline-block" );
|
||||||
|
ok( true, "Browser doesn't support inline-block" );
|
||||||
|
}
|
||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate native inline width/height", function() {
|
QUnit.test( "animate native inline width/height", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
|
||||||
var span = jQuery( "<span>" ).css( "display", "inline-block" ).appendTo( "body" );
|
var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
|
||||||
|
expected = span.css("display");
|
||||||
|
|
||||||
span.remove();
|
span.remove();
|
||||||
|
|
||||||
jQuery( "#foo" ).css( { display: "", width: "", height: "" } )
|
if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) {
|
||||||
.append( "<span>text</span>" )
|
jQuery("#foo").css({ display: "", width: "", height: "" })
|
||||||
.children( "span" )
|
.append("<span>text</span>")
|
||||||
.animate( { width: 42, height: 42 }, 100, function() {
|
.children("span")
|
||||||
equal( jQuery( this ).css( "display" ), "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
|
.animate({ width: 42, height: 42 }, 100, function() {
|
||||||
equal( this.offsetWidth, 42, "width was animated" );
|
equal( jQuery(this).css("display"), "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
|
||||||
equal( this.offsetHeight, 42, "height was animated" );
|
equal( this.offsetWidth, 42, "width was animated" );
|
||||||
} );
|
equal( this.offsetHeight, 42, "height was animated" );
|
||||||
|
});
|
||||||
|
|
||||||
|
// Browser doesn't support inline-block
|
||||||
|
} else {
|
||||||
|
ok( true, "Browser doesn't support inline-block" );
|
||||||
|
ok( true, "Browser doesn't support inline-block" );
|
||||||
|
ok( true, "Browser doesn't support inline-block" );
|
||||||
|
}
|
||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate block width/height", function() {
|
QUnit.test( "animate block width/height", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
|
||||||
jQuery( "<div>" ).appendTo( "#qunit-fixture" ).css( {
|
jQuery( "<div>" ).appendTo( "#qunit-fixture" ).css( {
|
||||||
@ -336,47 +361,56 @@ test( "animate block width/height", function() {
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate table width/height", function() {
|
QUnit.test("animate table width/height", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
|
|
||||||
|
var displayMode = jQuery( "#table" ).css( "display" ) !== "table" ? "block" : "table";
|
||||||
|
|
||||||
jQuery( "#table" ).animate( { width: 42, height: 42 }, 100, function() {
|
jQuery( "#table" ).animate( { width: 42, height: 42 }, 100, function() {
|
||||||
equal( jQuery( this ).css( "display" ), "table", "display mode is correct" );
|
equal( jQuery( this ).css( "display" ), displayMode, "display mode is correct" );
|
||||||
} );
|
} );
|
||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate table-row width/height", function() {
|
QUnit.test("animate table-row width/height", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
var tr = jQuery( "#table" )
|
var displayMode,
|
||||||
|
tr = jQuery( "#table" )
|
||||||
.attr( { "cellspacing": 0, "cellpadding": 0, "border": 0 } )
|
.attr( { "cellspacing": 0, "cellpadding": 0, "border": 0 } )
|
||||||
.html( "<tr style='height:42px;'><td style='padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
|
.html( "<tr style='height:42px;'><td style='padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
|
||||||
.find( "tr" );
|
.find( "tr" );
|
||||||
|
|
||||||
|
// IE<8 uses "block" instead of the correct display type
|
||||||
|
displayMode = tr.css( "display" ) !== "table-row" ? "block" : "table-row";
|
||||||
|
|
||||||
tr.animate( { width: 10, height: 10 }, 100, function() {
|
tr.animate( { width: 10, height: 10 }, 100, function() {
|
||||||
equal( jQuery( this ).css( "display" ), "table-row", "display mode is correct" );
|
equal( jQuery( this ).css( "display" ), displayMode, "display mode is correct" );
|
||||||
equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
|
equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
|
||||||
equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
|
equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
|
||||||
} );
|
} );
|
||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate table-cell width/height", function() {
|
QUnit.test( "animate table-cell width/height", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
var displayMode,
|
||||||
var td = jQuery( "#table" )
|
td = jQuery( "#table" )
|
||||||
.attr( { "cellspacing": 0, "cellpadding": 0, "border": 0 } )
|
.attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 })
|
||||||
.html( "<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
|
.html( "<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
|
||||||
.find( "td" );
|
.find( "td" );
|
||||||
|
|
||||||
|
// IE<8 uses "block" instead of the correct display type
|
||||||
|
displayMode = td.css( "display" ) !== "table-cell" ? "block" : "table-cell";
|
||||||
|
|
||||||
td.animate( { width: 10, height: 10 }, 100, function() {
|
td.animate( { width: 10, height: 10 }, 100, function() {
|
||||||
equal( jQuery( this ).css( "display" ), "table-cell", "display mode is correct" );
|
equal( jQuery( this ).css( "display" ), displayMode, "display mode is correct" );
|
||||||
equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
|
equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
|
||||||
equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
|
equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
|
||||||
} );
|
} );
|
||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate percentage(%) on width/height", function() {
|
QUnit.test( "animate percentage(%) on width/height", function() {
|
||||||
expect( 2 );
|
expect( 2 );
|
||||||
|
|
||||||
var $div = jQuery( "<div style='position:absolute;top:-999px;left:-999px;width:60px;height:60px;'><div style='width:50%;height:50%;'></div></div>" )
|
var $div = jQuery( "<div style='position:absolute;top:-999px;left:-999px;width:60px;height:60px;'><div style='width:50%;height:50%;'></div></div>" )
|
||||||
@ -390,7 +424,7 @@ test( "animate percentage(%) on width/height", function() {
|
|||||||
this.clock.tick( 20 );
|
this.clock.tick( 20 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate resets overflow-x and overflow-y when finished", function() {
|
QUnit.test( "animate resets overflow-x and overflow-y when finished", function() {
|
||||||
expect( 2 );
|
expect( 2 );
|
||||||
jQuery( "#foo" )
|
jQuery( "#foo" )
|
||||||
.css( { display: "block", width: 20, height: 20, overflowX: "visible", overflowY: "auto" } )
|
.css( { display: "block", width: 20, height: 20, overflowX: "visible", overflowY: "auto" } )
|
||||||
@ -402,7 +436,7 @@ test( "animate resets overflow-x and overflow-y when finished", function() {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
/* // This test ends up being flaky depending upon the CPU load
|
/* // This test ends up being flaky depending upon the CPU load
|
||||||
test("animate option (queue === false)", function () {
|
QUnit.test("animate option (queue === false)", function () {
|
||||||
expect(1);
|
expect(1);
|
||||||
stop();
|
stop();
|
||||||
|
|
||||||
@ -422,7 +456,7 @@ test("animate option (queue === false)", function () {
|
|||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
test( "animate option { queue: false }", function() {
|
QUnit.test( "animate option { queue: false }", function() {
|
||||||
expect( 2 );
|
expect( 2 );
|
||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
|
|
||||||
@ -440,7 +474,7 @@ test( "animate option { queue: false }", function() {
|
|||||||
equal( foo.queue().length, 0, "Queue is empty" );
|
equal( foo.queue().length, 0, "Queue is empty" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate option { queue: true }", function() {
|
QUnit.test( "animate option { queue: true }", function() {
|
||||||
expect( 2 );
|
expect( 2 );
|
||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
|
|
||||||
@ -460,7 +494,7 @@ test( "animate option { queue: true }", function() {
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate option { queue: 'name' }", function() {
|
QUnit.test( "animate option { queue: 'name' }", function() {
|
||||||
expect( 5 );
|
expect( 5 );
|
||||||
var foo = jQuery( "#foo" ),
|
var foo = jQuery( "#foo" ),
|
||||||
origWidth = parseFloat( foo.css( "width" ) ),
|
origWidth = parseFloat( foo.css( "width" ) ),
|
||||||
@ -492,7 +526,7 @@ test( "animate option { queue: 'name' }", function() {
|
|||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate with no properties", function() {
|
QUnit.test( "animate with no properties", function() {
|
||||||
expect( 2 );
|
expect( 2 );
|
||||||
|
|
||||||
var foo,
|
var foo,
|
||||||
@ -514,7 +548,7 @@ test( "animate with no properties", function() {
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate duration 0", function() {
|
QUnit.test( "animate duration 0", function() {
|
||||||
expect( 11 );
|
expect( 11 );
|
||||||
|
|
||||||
var $elem,
|
var $elem,
|
||||||
@ -564,7 +598,7 @@ test( "animate duration 0", function() {
|
|||||||
$elem.remove();
|
$elem.remove();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate hyphenated properties", function() {
|
QUnit.test( "animate hyphenated properties", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
|
|
||||||
jQuery( "#foo" )
|
jQuery( "#foo" )
|
||||||
@ -578,7 +612,7 @@ test( "animate hyphenated properties", function() {
|
|||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate non-element", function() {
|
QUnit.test( "animate non-element", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
|
|
||||||
var obj = { test: 0 };
|
var obj = { test: 0 };
|
||||||
@ -589,7 +623,7 @@ test( "animate non-element", function() {
|
|||||||
this.clock.tick( 200 );
|
this.clock.tick( 200 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "stop()", function() {
|
QUnit.test( "stop()", function() {
|
||||||
expect( 4 );
|
expect( 4 );
|
||||||
|
|
||||||
var $one, $two,
|
var $one, $two,
|
||||||
@ -629,7 +663,7 @@ test( "stop()", function() {
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "stop() - several in queue", function() {
|
QUnit.test( "stop() - several in queue", function() {
|
||||||
expect( 5 );
|
expect( 5 );
|
||||||
|
|
||||||
var nw, $foo = jQuery( "#foo" );
|
var nw, $foo = jQuery( "#foo" );
|
||||||
@ -659,7 +693,7 @@ test( "stop() - several in queue", function() {
|
|||||||
equal( $foo.queue().length, 0, "0 in the queue" );
|
equal( $foo.queue().length, 0, "0 in the queue" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "stop(clearQueue)", function() {
|
QUnit.test( "stop(clearQueue)", function() {
|
||||||
expect( 4 );
|
expect( 4 );
|
||||||
|
|
||||||
var $foo = jQuery( "#foo" ),
|
var $foo = jQuery( "#foo" ),
|
||||||
@ -683,7 +717,7 @@ test( "stop(clearQueue)", function() {
|
|||||||
equal( nw, $foo.css( "width" ), "The animation didn't continue" );
|
equal( nw, $foo.css( "width" ), "The animation didn't continue" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "stop(clearQueue, gotoEnd)", function() {
|
QUnit.test( "stop(clearQueue, gotoEnd)", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
|
|
||||||
var $foo = jQuery( "#foo" ),
|
var $foo = jQuery( "#foo" ),
|
||||||
@ -712,7 +746,7 @@ test( "stop(clearQueue, gotoEnd)", function() {
|
|||||||
$foo.stop( true );
|
$foo.stop( true );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "stop( queue, ..., ... ) - Stop single queues", function() {
|
QUnit.test( "stop( queue, ..., ... ) - Stop single queues", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
var saved,
|
var saved,
|
||||||
foo = jQuery( "#foo" ).css( { width: 200, height: 200 } );
|
foo = jQuery( "#foo" ).css( { width: 200, height: 200 } );
|
||||||
@ -743,10 +777,10 @@ test( "stop( queue, ..., ... ) - Stop single queues", function() {
|
|||||||
queue: "height"
|
queue: "height"
|
||||||
} ).dequeue( "height" ).stop( "height", false, false );
|
} ).dequeue( "height" ).stop( "height", false, false );
|
||||||
saved = parseFloat( foo.css( "height" ) );
|
saved = parseFloat( foo.css( "height" ) );
|
||||||
this.clock.tick( 500 );
|
this.clock.tick( 500 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "toggle()", function() {
|
QUnit.test( "toggle()", function() {
|
||||||
expect( 6 );
|
expect( 6 );
|
||||||
var x = jQuery( "#foo" );
|
var x = jQuery( "#foo" );
|
||||||
ok( x.is( ":visible" ), "is visible" );
|
ok( x.is( ":visible" ), "is visible" );
|
||||||
@ -763,7 +797,7 @@ test( "toggle()", function() {
|
|||||||
ok( x.is( ":visible" ), "is visible again" );
|
ok( x.is( ":visible" ), "is visible again" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "jQuery.fx.prototype.cur() - <1.8 Back Compat", 7, function() {
|
QUnit.test( "jQuery.fx.prototype.cur() - <1.8 Back Compat", 7, function() {
|
||||||
var div = jQuery( "<div></div>" ).appendTo( "#qunit-fixture" ).css( {
|
var div = jQuery( "<div></div>" ).appendTo( "#qunit-fixture" ).css( {
|
||||||
color: "#ABC",
|
color: "#ABC",
|
||||||
border: "5px solid black",
|
border: "5px solid black",
|
||||||
@ -817,7 +851,7 @@ test( "jQuery.fx.prototype.cur() - <1.8 Back Compat", 7, function() {
|
|||||||
jQuery( div ).remove();
|
jQuery( div ).remove();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Overflow and Display", function() {
|
QUnit.test( "Overflow and Display", function() {
|
||||||
expect( 4 );
|
expect( 4 );
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -896,7 +930,7 @@ jQuery.each( {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}, function( tn, t ) {
|
}, function( tn, t ) {
|
||||||
test( fn + " to " + tn, function() {
|
QUnit.test( fn + " to " + tn, function() {
|
||||||
var num, anim,
|
var num, anim,
|
||||||
elem = jQuery.makeTest( fn + " to " + tn ),
|
elem = jQuery.makeTest( fn + " to " + tn ),
|
||||||
t_w = t( elem, "width" ),
|
t_w = t( elem, "width" ),
|
||||||
@ -1013,12 +1047,12 @@ jQuery.each( {
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Effects chaining", function() {
|
QUnit.test( "Effects chaining", function() {
|
||||||
var remaining = 16,
|
var remaining = 16,
|
||||||
props = [ "opacity", "height", "width", "display", "overflow" ],
|
props = [ "opacity", "height", "width", "display", "overflow" ],
|
||||||
setup = function( name, selector ) {
|
setup = function( name, selector ) {
|
||||||
var $el = jQuery( selector );
|
var $el = jQuery( selector );
|
||||||
return $el.data( getProps( $el[ 0 ] ) ).data( "name", name );
|
return $el.data( getProps( $el[0] ) ).data( "name", name );
|
||||||
},
|
},
|
||||||
assert = function() {
|
assert = function() {
|
||||||
var data = jQuery.data( this ),
|
var data = jQuery.data( this ),
|
||||||
@ -1041,39 +1075,39 @@ test( "Effects chaining", function() {
|
|||||||
|
|
||||||
setup( ".fadeOut().fadeIn()", "#fadein div" ).fadeOut( "fast" ).fadeIn( "fast", assert );
|
setup( ".fadeOut().fadeIn()", "#fadein div" ).fadeOut( "fast" ).fadeIn( "fast", assert );
|
||||||
setup( ".fadeIn().fadeOut()", "#fadeout div" ).fadeIn( "fast" ).fadeOut( "fast", assert );
|
setup( ".fadeIn().fadeOut()", "#fadeout div" ).fadeIn( "fast" ).fadeOut( "fast", assert );
|
||||||
setup( ".hide().show()", "#show div" ).hide( "fast" ).show( "fast", assert );
|
setup( ".hide().show()", "#show div" ).hide("fast").show( "fast", assert );
|
||||||
setup( ".show().hide()", "#hide div" ).show( "fast" ).hide( "fast", assert );
|
setup( ".show().hide()", "#hide div" ).show("fast").hide( "fast", assert );
|
||||||
setup( ".show().hide(easing)", "#easehide div" ).show( "fast" ).hide( "fast", "linear", assert );
|
setup( ".show().hide(easing)", "#easehide div" ).show("fast").hide( "fast", "linear", assert );
|
||||||
setup( ".toggle().toggle() - in", "#togglein div" ).toggle( "fast" ).toggle( "fast", assert );
|
setup( ".toggle().toggle() - in", "#togglein div" ).toggle("fast").toggle( "fast", assert );
|
||||||
setup( ".toggle().toggle() - out", "#toggleout div" ).toggle( "fast" ).toggle( "fast", assert );
|
setup( ".toggle().toggle() - out", "#toggleout div" ).toggle("fast").toggle( "fast", assert );
|
||||||
setup( ".toggle().toggle(easing) - out", "#easetoggleout div" ).toggle( "fast" ).toggle( "fast", "linear", assert );
|
setup( ".toggle().toggle(easing) - out", "#easetoggleout div" ).toggle("fast").toggle( "fast", "linear", assert );
|
||||||
setup( ".slideDown().slideUp()", "#slidedown div" ).slideDown( "fast" ).slideUp( "fast", assert );
|
setup( ".slideDown().slideUp()", "#slidedown div" ).slideDown("fast").slideUp( "fast", assert );
|
||||||
setup( ".slideUp().slideDown()", "#slideup div" ).slideUp( "fast" ).slideDown( "fast", assert );
|
setup( ".slideUp().slideDown()", "#slideup div" ).slideUp("fast").slideDown( "fast", assert );
|
||||||
setup( ".slideUp().slideDown(easing)", "#easeslideup div" ).slideUp( "fast" ).slideDown( "fast", "linear", assert );
|
setup( ".slideUp().slideDown(easing)", "#easeslideup div" ).slideUp("fast").slideDown( "fast", "linear", assert );
|
||||||
setup( ".slideToggle().slideToggle() - in", "#slidetogglein div" ).slideToggle( "fast" ).slideToggle( "fast", assert );
|
setup( ".slideToggle().slideToggle() - in", "#slidetogglein div" ).slideToggle("fast").slideToggle( "fast", assert );
|
||||||
setup( ".slideToggle().slideToggle() - out", "#slidetoggleout div" ).slideToggle( "fast" ).slideToggle( "fast", assert );
|
setup( ".slideToggle().slideToggle() - out", "#slidetoggleout div" ).slideToggle("fast").slideToggle( "fast", assert );
|
||||||
setup( ".fadeToggle().fadeToggle() - in", "#fadetogglein div" ).fadeToggle( "fast" ).fadeToggle( "fast", assert );
|
setup( ".fadeToggle().fadeToggle() - in", "#fadetogglein div" ).fadeToggle( "fast" ).fadeToggle( "fast", assert );
|
||||||
setup( ".fadeToggle().fadeToggle() - out", "#fadetoggleout div" ).fadeToggle( "fast" ).fadeToggle( "fast", assert );
|
setup( ".fadeToggle().fadeToggle() - out", "#fadetoggleout div" ).fadeToggle( "fast" ).fadeToggle( "fast", assert );
|
||||||
setup( ".fadeTo(0.5).fadeTo(1.0, easing)", "#fadeto div" ).fadeTo( "fast", 0.5 ).fadeTo( "fast", 1.0, "linear", assert );
|
setup( ".fadeTo(0.5).fadeTo(1.0, easing)", "#fadeto div" ).fadeTo( "fast", 0.5 ).fadeTo( "fast", 1.0, "linear", assert );
|
||||||
this.clock.tick( 400 );
|
this.clock.tick( 400 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
jQuery.makeTest = function( text ) {
|
jQuery.makeTest = function( text ) {
|
||||||
var elem = jQuery( "<div></div>" )
|
var elem = jQuery( "<div></div>" )
|
||||||
.attr( "id", "test" + jQuery.makeTest.id++ )
|
.attr( "id", "test" + jQuery.makeTest.id++ )
|
||||||
.addClass( "box" );
|
.addClass( "box" );
|
||||||
|
|
||||||
jQuery( "<h4></h4>" )
|
jQuery( "<h4></h4>" )
|
||||||
.text( text )
|
.text( text )
|
||||||
.appendTo( "#fx-tests" )
|
.appendTo( "#fx-tests" )
|
||||||
.after( elem );
|
.after( elem );
|
||||||
|
|
||||||
return elem;
|
return elem;
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.makeTest.id = 1;
|
jQuery.makeTest.id = 1;
|
||||||
|
|
||||||
test( "jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function() {
|
QUnit.test( "jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function() {
|
||||||
expect( 4 );
|
expect( 4 );
|
||||||
|
|
||||||
var $checkedtest = jQuery( "#checkedtest" );
|
var $checkedtest = jQuery( "#checkedtest" );
|
||||||
@ -1086,7 +1120,7 @@ test( "jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function()
|
|||||||
this.clock.tick( 200 );
|
this.clock.tick( 200 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "interrupt toggle", function() {
|
QUnit.test( "interrupt toggle", function() {
|
||||||
expect( 24 );
|
expect( 24 );
|
||||||
|
|
||||||
var env = this,
|
var env = this,
|
||||||
@ -1148,7 +1182,7 @@ test( "interrupt toggle", function() {
|
|||||||
// FIXME untangle the set timeouts
|
// FIXME untangle the set timeouts
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate with per-property easing", function() {
|
QUnit.test( "animate with per-property easing", function() {
|
||||||
|
|
||||||
expect( 5 );
|
expect( 5 );
|
||||||
|
|
||||||
@ -1188,7 +1222,7 @@ test( "animate with per-property easing", function() {
|
|||||||
this.clock.tick( 400 );
|
this.clock.tick( 400 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate with CSS shorthand properties", function() {
|
QUnit.test( "animate with CSS shorthand properties", function() {
|
||||||
expect( 11 );
|
expect( 11 );
|
||||||
|
|
||||||
var easeAnimation_count = 0,
|
var easeAnimation_count = 0,
|
||||||
@ -1234,7 +1268,7 @@ test( "animate with CSS shorthand properties", function() {
|
|||||||
this.clock.tick( 400 );
|
this.clock.tick( 400 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "hide hidden elements, with animation (bug #7141)", function() {
|
QUnit.test( "hide hidden elements, with animation (bug #7141)", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
|
||||||
var div = jQuery( "<div style='display:none'></div>" ).appendTo( "#qunit-fixture" );
|
var div = jQuery( "<div style='display:none'></div>" ).appendTo( "#qunit-fixture" );
|
||||||
@ -1248,7 +1282,7 @@ test( "hide hidden elements, with animation (bug #7141)", function() {
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate unit-less properties (#4966)", 2, function() {
|
QUnit.test( "animate unit-less properties (#4966)", 2, function() {
|
||||||
var div = jQuery( "<div style='z-index: 0; position: absolute;'></div>" ).appendTo( "#qunit-fixture" );
|
var div = jQuery( "<div style='z-index: 0; position: absolute;'></div>" ).appendTo( "#qunit-fixture" );
|
||||||
equal( div.css( "z-index" ), "0", "z-index is 0" );
|
equal( div.css( "z-index" ), "0", "z-index is 0" );
|
||||||
div.animate( { zIndex: 2 }, function() {
|
div.animate( { zIndex: 2 }, function() {
|
||||||
@ -1257,7 +1291,7 @@ test( "animate unit-less properties (#4966)", 2, function() {
|
|||||||
this.clock.tick( 400 );
|
this.clock.tick( 400 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate properties missing px w/ opacity as last (#9074)", 2, function() {
|
QUnit.test( "animate properties missing px w/ opacity as last (#9074)", 2, function() {
|
||||||
expect( 6 );
|
expect( 6 );
|
||||||
var ml, l,
|
var ml, l,
|
||||||
div = jQuery( "<div style='position: absolute; margin-left: 0; left: 0px;'></div>" )
|
div = jQuery( "<div style='position: absolute; margin-left: 0; left: 0px;'></div>" )
|
||||||
@ -1284,7 +1318,7 @@ test( "animate properties missing px w/ opacity as last (#9074)", 2, function()
|
|||||||
div.stop().remove();
|
div.stop().remove();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "callbacks should fire in correct order (#9100)", function() {
|
QUnit.test( "callbacks should fire in correct order (#9100)", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
|
|
||||||
var a = 1,
|
var a = 1,
|
||||||
@ -1304,7 +1338,7 @@ test( "callbacks should fire in correct order (#9100)", function() {
|
|||||||
this.clock.tick( 20 );
|
this.clock.tick( 20 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "callbacks that throw exceptions will be removed (#5684)", function() {
|
QUnit.test( "callbacks that throw exceptions will be removed (#5684)", function() {
|
||||||
expect( 2 );
|
expect( 2 );
|
||||||
|
|
||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
@ -1332,7 +1366,7 @@ test( "callbacks that throw exceptions will be removed (#5684)", function() {
|
|||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate will scale margin properties individually", function() {
|
QUnit.test( "animate will scale margin properties individually", function() {
|
||||||
expect( 2 );
|
expect( 2 );
|
||||||
|
|
||||||
var foo = jQuery( "#foo" ).css( {
|
var foo = jQuery( "#foo" ).css( {
|
||||||
@ -1357,7 +1391,7 @@ test( "animate will scale margin properties individually", function() {
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Do not append px to 'fill-opacity' #9548", 1, function() {
|
QUnit.test( "Do not append px to 'fill-opacity' #9548", 1, function() {
|
||||||
var $div = jQuery( "<div>" ).appendTo( "#qunit-fixture" );
|
var $div = jQuery( "<div>" ).appendTo( "#qunit-fixture" );
|
||||||
|
|
||||||
$div.css( "fill-opacity", 0 ).animate( { "fill-opacity": 1.0 }, 0, function() {
|
$div.css( "fill-opacity", 0 ).animate( { "fill-opacity": 1.0 }, 0, function() {
|
||||||
@ -1372,7 +1406,7 @@ test( "Do not append px to 'fill-opacity' #9548", 1, function() {
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "line-height animates correctly (#13855)", 12, function() {
|
QUnit.test( "line-height animates correctly (#13855)", 12, function() {
|
||||||
var t0,
|
var t0,
|
||||||
clock = this.clock,
|
clock = this.clock,
|
||||||
longDuration = 2000,
|
longDuration = 2000,
|
||||||
@ -1434,7 +1468,7 @@ clock.tick( 50 );
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
// Start 1.8 Animation tests
|
// Start 1.8 Animation tests
|
||||||
test( "jQuery.Animation( object, props, opts )", 4, function() {
|
QUnit.test( "jQuery.Animation( object, props, opts )", 4, function() {
|
||||||
var animation,
|
var animation,
|
||||||
testObject = {
|
testObject = {
|
||||||
"foo": 0,
|
"foo": 0,
|
||||||
@ -1459,7 +1493,7 @@ test( "jQuery.Animation( object, props, opts )", 4, function() {
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Animate Option: step: function( percent, tween )", 1, function() {
|
QUnit.test( "Animate Option: step: function( percent, tween )", 1, function() {
|
||||||
var counter = {};
|
var counter = {};
|
||||||
jQuery( "#foo" ).animate( {
|
jQuery( "#foo" ).animate( {
|
||||||
prop1: 1,
|
prop1: 1,
|
||||||
@ -1485,7 +1519,7 @@ test( "Animate Option: step: function( percent, tween )", 1, function() {
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Animate callbacks have correct context", 2, function() {
|
QUnit.test( "Animate callbacks have correct context", 2, function() {
|
||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
foo.animate( {
|
foo.animate( {
|
||||||
height: 10
|
height: 10
|
||||||
@ -1500,7 +1534,7 @@ test( "Animate callbacks have correct context", 2, function() {
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "User supplied callback called after show when fx off (#8892)", 2, function() {
|
QUnit.test( "User supplied callback called after show when fx off (#8892)", 2, function() {
|
||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
jQuery.fx.off = true;
|
jQuery.fx.off = true;
|
||||||
foo.hide();
|
foo.hide();
|
||||||
@ -1514,7 +1548,7 @@ test( "User supplied callback called after show when fx off (#8892)", 2, functio
|
|||||||
this.clock.tick( 1000 );
|
this.clock.tick( 1000 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate should set display for disconnected nodes", function() {
|
QUnit.test( "animate should set display for disconnected nodes", function() {
|
||||||
expect( 18 );
|
expect( 18 );
|
||||||
|
|
||||||
var env = this,
|
var env = this,
|
||||||
@ -1563,10 +1597,10 @@ test( "animate should set display for disconnected nodes", function() {
|
|||||||
jQuery.fn[ name ].apply( this, opt.concat( callback ) );
|
jQuery.fn[ name ].apply( this, opt.concat( callback ) );
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
clock.tick( 400 );
|
clock.tick( 400 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Animation callback should not show animated element as :animated (#7157)", 1, function() {
|
QUnit.test( "Animation callback should not show animated element as :animated (#7157)", 1, function() {
|
||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
|
|
||||||
foo.animate( {
|
foo.animate( {
|
||||||
@ -1577,7 +1611,7 @@ test( "Animation callback should not show animated element as :animated (#7157)"
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Initial step callback should show element as :animated (#14623)", 1, function() {
|
QUnit.test( "Initial step callback should show element as :animated (#14623)", 1, function() {
|
||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
|
|
||||||
foo.animate( {
|
foo.animate( {
|
||||||
@ -1592,7 +1626,7 @@ test( "Initial step callback should show element as :animated (#14623)", 1, func
|
|||||||
foo.stop();
|
foo.stop();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "hide called on element within hidden parent should set display to none (#10045)", 3, function() {
|
QUnit.test( "hide called on element within hidden parent should set display to none (#10045)", 3, function() {
|
||||||
var hidden = jQuery( ".hidden" ),
|
var hidden = jQuery( ".hidden" ),
|
||||||
elems = jQuery( "<div>hide</div><div>hide0</div><div>hide1</div>" );
|
elems = jQuery( "<div>hide</div><div>hide0</div><div>hide1</div>" );
|
||||||
|
|
||||||
@ -1612,7 +1646,7 @@ test( "hide called on element within hidden parent should set display to none (#
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "hide, fadeOut and slideUp called on element width height and width = 0 should set display to none", 5, function() {
|
QUnit.test( "hide, fadeOut and slideUp called on element width height and width = 0 should set display to none", 5, function() {
|
||||||
var foo = jQuery( "#foo" ),
|
var foo = jQuery( "#foo" ),
|
||||||
i = 0,
|
i = 0,
|
||||||
elems = jQuery();
|
elems = jQuery();
|
||||||
@ -1641,7 +1675,7 @@ test( "hide, fadeOut and slideUp called on element width height and width = 0 sh
|
|||||||
this.clock.tick( 400 );
|
this.clock.tick( 400 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "hide should not leave hidden inline elements visible (#14848)", 2, function() {
|
QUnit.test( "hide should not leave hidden inline elements visible (#14848)", 2, function() {
|
||||||
var el = jQuery( "#simon1" );
|
var el = jQuery( "#simon1" );
|
||||||
|
|
||||||
el.hide( 1, function() {
|
el.hide( 1, function() {
|
||||||
@ -1654,7 +1688,7 @@ test( "hide should not leave hidden inline elements visible (#14848)", 2, functi
|
|||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Handle queue:false promises", 10, function() {
|
QUnit.test( "Handle queue:false promises", 10, function() {
|
||||||
var foo = jQuery( "#foo" ).clone().addBack(),
|
var foo = jQuery( "#foo" ).clone().addBack(),
|
||||||
step = 1;
|
step = 1;
|
||||||
|
|
||||||
@ -1705,7 +1739,7 @@ test( "Handle queue:false promises", 10, function() {
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "multiple unqueued and promise", 4, function() {
|
QUnit.test( "multiple unqueued and promise", 4, function() {
|
||||||
var foo = jQuery( "#foo" ),
|
var foo = jQuery( "#foo" ),
|
||||||
step = 1;
|
step = 1;
|
||||||
foo.animate( {
|
foo.animate( {
|
||||||
@ -1738,7 +1772,7 @@ test( "multiple unqueued and promise", 4, function() {
|
|||||||
this.clock.tick( 1000 );
|
this.clock.tick( 1000 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "animate does not change start value for non-px animation (#7109)", 1, function() {
|
QUnit.test( "animate does not change start value for non-px animation (#7109)", 1, function() {
|
||||||
var parent = jQuery( "<div><div></div></div>" ).css( { width: 284, height: 1 } ).appendTo( "#qunit-fixture" ),
|
var parent = jQuery( "<div><div></div></div>" ).css( { width: 284, height: 1 } ).appendTo( "#qunit-fixture" ),
|
||||||
child = parent.children().css( { fontSize: "98.6in", width: "0.01em", height: 1 } ),
|
child = parent.children().css( { fontSize: "98.6in", width: "0.01em", height: 1 } ),
|
||||||
actual = parseFloat( child.css( "width" ) ),
|
actual = parseFloat( child.css( "width" ) ),
|
||||||
@ -1758,7 +1792,7 @@ test( "animate does not change start value for non-px animation (#7109)", 1, fun
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "non-px animation handles non-numeric start (#11971)", 2, function() {
|
QUnit.test( "non-px animation handles non-numeric start (#11971)", 2, function() {
|
||||||
var foo = jQuery( "#foo" ),
|
var foo = jQuery( "#foo" ),
|
||||||
initial = foo.css( "backgroundPositionX" );
|
initial = foo.css( "backgroundPositionX" );
|
||||||
|
|
||||||
@ -1875,7 +1909,7 @@ QUnit.test( "Animation callbacks (#11797)", function( assert ) {
|
|||||||
this.clock.tick( 10 );
|
this.clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Animate properly sets overflow hidden when animating width/height (#12117)", 8, function() {
|
QUnit.test( "Animate properly sets overflow hidden when animating width/height (#12117)", 8, function() {
|
||||||
jQuery.each( [ "height", "width" ], function( _, prop ) {
|
jQuery.each( [ "height", "width" ], function( _, prop ) {
|
||||||
jQuery.each( [ 100, 0 ], function( _, value ) {
|
jQuery.each( [ 100, 0 ], function( _, value ) {
|
||||||
var div = jQuery( "<div>" ).css( "overflow", "auto" ),
|
var div = jQuery( "<div>" ).css( "overflow", "auto" ),
|
||||||
@ -1891,7 +1925,7 @@ test( "Animate properly sets overflow hidden when animating width/height (#12117
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Each tick of the timer loop uses a fresh time (#12837)", function() {
|
QUnit.test( "Each tick of the timer loop uses a fresh time (#12837)", function() {
|
||||||
var lastVal,
|
var lastVal,
|
||||||
tmp = jQuery( {
|
tmp = jQuery( {
|
||||||
test: 0
|
test: 0
|
||||||
@ -1916,7 +1950,7 @@ test( "Each tick of the timer loop uses a fresh time (#12837)", function() {
|
|||||||
tmp.stop();
|
tmp.stop();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Animations with 0 duration don't ease (#12273)", 1, function() {
|
QUnit.test( "Animations with 0 duration don't ease (#12273)", 1, function() {
|
||||||
jQuery.easing.test = function() {
|
jQuery.easing.test = function() {
|
||||||
ok( false, "Called easing" );
|
ok( false, "Called easing" );
|
||||||
};
|
};
|
||||||
@ -1939,7 +1973,7 @@ jQuery.map( [ "toggle", "slideToggle", "fadeToggle" ], function( method ) {
|
|||||||
// this test would look a lot better if we were using something to override
|
// this test would look a lot better if we were using something to override
|
||||||
// the default timers
|
// the default timers
|
||||||
var duration = 1500;
|
var duration = 1500;
|
||||||
test( "toggle state tests: " + method + " (#8685)", function() {
|
QUnit.test( "toggle state tests: " + method + " (#8685)", function() {
|
||||||
function secondToggle() {
|
function secondToggle() {
|
||||||
var stopped = parseFloat( element.css( check ) );
|
var stopped = parseFloat( element.css( check ) );
|
||||||
tested = false;
|
tested = false;
|
||||||
@ -1983,7 +2017,7 @@ jQuery.map( [ "toggle", "slideToggle", "fadeToggle" ], function( method ) {
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "jQuery.fx.start & jQuery.fx.stop hook points", function() {
|
QUnit.test( "jQuery.fx.start & jQuery.fx.stop hook points", function() {
|
||||||
var oldStart = jQuery.fx.start,
|
var oldStart = jQuery.fx.start,
|
||||||
oldStop = jQuery.fx.stop,
|
oldStop = jQuery.fx.stop,
|
||||||
foo = jQuery( { foo: 0 } );
|
foo = jQuery( { foo: 0 } );
|
||||||
@ -2012,7 +2046,7 @@ test( "jQuery.fx.start & jQuery.fx.stop hook points", function() {
|
|||||||
jQuery.fx.stop = oldStop;
|
jQuery.fx.stop = oldStop;
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( ".finish() completes all queued animations", function() {
|
QUnit.test( ".finish() completes all queued animations", function() {
|
||||||
var animations = {
|
var animations = {
|
||||||
top: 100,
|
top: 100,
|
||||||
left: 100,
|
left: 100,
|
||||||
@ -2047,7 +2081,7 @@ test( ".finish() completes all queued animations", function() {
|
|||||||
jQuery.fx.tick();
|
jQuery.fx.tick();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( ".finish( false ) - unqueued animations", function() {
|
QUnit.test( ".finish( false ) - unqueued animations", function() {
|
||||||
var animations = {
|
var animations = {
|
||||||
top: 100,
|
top: 100,
|
||||||
left: 100,
|
left: 100,
|
||||||
@ -2082,7 +2116,7 @@ test( ".finish( false ) - unqueued animations", function() {
|
|||||||
jQuery.fx.tick();
|
jQuery.fx.tick();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( ".finish( \"custom\" ) - custom queue animations", function() {
|
QUnit.test( ".finish( \"custom\" ) - custom queue animations", function() {
|
||||||
var animations = {
|
var animations = {
|
||||||
top: 100,
|
top: 100,
|
||||||
left: 100,
|
left: 100,
|
||||||
@ -2121,7 +2155,7 @@ test( ".finish( \"custom\" ) - custom queue animations", function() {
|
|||||||
jQuery.fx.tick();
|
jQuery.fx.tick();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( ".finish() calls finish of custom queue functions", function() {
|
QUnit.test( ".finish() calls finish of custom queue functions", function() {
|
||||||
function queueTester( next, hooks ) {
|
function queueTester( next, hooks ) {
|
||||||
hooks.stop = function( gotoEnd ) {
|
hooks.stop = function( gotoEnd ) {
|
||||||
inside++;
|
inside++;
|
||||||
@ -2147,7 +2181,7 @@ test( ".finish() calls finish of custom queue functions", function() {
|
|||||||
div.remove();
|
div.remove();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( ".finish() is applied correctly when multiple elements were animated (#13937)", function() {
|
QUnit.test( ".finish() is applied correctly when multiple elements were animated (#13937)", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
|
||||||
var elems = jQuery( "<a>0</a><a>1</a><a>2</a>" );
|
var elems = jQuery( "<a>0</a><a>1</a><a>2</a>" );
|
||||||
@ -2164,38 +2198,38 @@ test( ".finish() is applied correctly when multiple elements were animated (#139
|
|||||||
this.clock.tick( 1500 );
|
this.clock.tick( 1500 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "slideDown() after stop() (#13483)", 2, function() {
|
QUnit.test( "slideDown() after stop() (#13483)", 2, function() {
|
||||||
var ul = jQuery( "<ul style='height: 100px; display: block;'></ul>" )
|
var ul = jQuery( "<ul style='height: 100px; display: block;'></ul>" )
|
||||||
.appendTo( "#qunit-fixture" ),
|
.appendTo( "#qunit-fixture" ),
|
||||||
origHeight = ul.height(),
|
origHeight = ul.height(),
|
||||||
clock = this.clock;
|
clock = this.clock;
|
||||||
|
|
||||||
// First test. slideUp() -> stop() in the middle -> slideDown() until the end
|
// First test. slideUp() -> stop() in the middle -> slideDown() until the end
|
||||||
ul.slideUp( 1000 );
|
ul.slideUp( 1000 );
|
||||||
|
clock.tick( 500 );
|
||||||
|
ul.stop( true );
|
||||||
|
ul.slideDown( 1, function() {
|
||||||
|
equal( ul.height(), origHeight, "slideDown() after interrupting slideUp() with stop(). Height must be in original value" );
|
||||||
|
|
||||||
|
// Second test. slideDown() -> stop() in the middle -> slideDown() until the end
|
||||||
|
ul.slideUp( 1 );
|
||||||
|
clock.tick( 10 );
|
||||||
|
ul.slideDown( 1000 );
|
||||||
clock.tick( 500 );
|
clock.tick( 500 );
|
||||||
ul.stop( true );
|
ul.stop( true );
|
||||||
ul.slideDown( 1, function() {
|
ul.slideDown( 1 );
|
||||||
equal( ul.height(), origHeight, "slideDown() after interrupting slideUp() with stop(). Height must be in original value" );
|
equal( ul.height(), origHeight, "slideDown() after interrupting slideDown() with stop(). Height must be in original value" );
|
||||||
|
|
||||||
// Second test. slideDown() -> stop() in the middle -> slideDown() until the end
|
|
||||||
ul.slideUp( 1 );
|
|
||||||
clock.tick( 10 );
|
|
||||||
ul.slideDown( 1000 );
|
|
||||||
clock.tick( 500 );
|
|
||||||
ul.stop( true );
|
|
||||||
ul.slideDown( 1 );
|
|
||||||
equal( ul.height(), origHeight, "slideDown() after interrupting slideDown() with stop(). Height must be in original value" );
|
|
||||||
|
|
||||||
// Cleanup
|
|
||||||
ul.remove();
|
|
||||||
clock.tick( 10 );
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
|
ul.remove();
|
||||||
clock.tick( 10 );
|
clock.tick( 10 );
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
clock.tick( 10 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Respect display value on inline elements (#14824)", 2, function() {
|
QUnit.test( "Respect display value on inline elements (#14824)", 2, function() {
|
||||||
var clock = this.clock,
|
var clock = this.clock,
|
||||||
fromStyleSheet = jQuery( "<span id='span-14824' />" ),
|
fromStyleSheet = jQuery( "<span id='span-14824' />" ),
|
||||||
fromStyleAttr = jQuery( "<span style='display: block;' />" );
|
fromStyleAttr = jQuery( "<span style='display: block;' />" );
|
||||||
|
@ -1422,7 +1422,7 @@ QUnit.test( "Submit event can be stopped (#11049)", function( assert ) {
|
|||||||
form.remove();
|
form.remove();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Test beforeunload event only if it supported.
|
// Test beforeunload event only if it supported (i.e. not Opera)
|
||||||
// Support: iOS 7+, Android<4.0
|
// Support: iOS 7+, Android<4.0
|
||||||
// iOS & old Android have the window.onbeforeunload field but don't support the beforeunload
|
// iOS & old Android have the window.onbeforeunload field but don't support the beforeunload
|
||||||
// handler making it impossible to feature-detect the support.
|
// handler making it impossible to feature-detect the support.
|
||||||
@ -1430,6 +1430,7 @@ if ( window.onbeforeunload === null &&
|
|||||||
!/(ipad|iphone|ipod|android 2\.3)/i.test( navigator.userAgent ) ) {
|
!/(ipad|iphone|ipod|android 2\.3)/i.test( navigator.userAgent ) ) {
|
||||||
QUnit.asyncTest( "on(beforeunload)", 4, function( assert ) {
|
QUnit.asyncTest( "on(beforeunload)", 4, function( assert ) {
|
||||||
var win,
|
var win,
|
||||||
|
forIE6 = 0,
|
||||||
fired = false,
|
fired = false,
|
||||||
iframe = jQuery( "<iframe src='data/iframe.html' />" );
|
iframe = jQuery( "<iframe src='data/iframe.html' />" );
|
||||||
|
|
||||||
@ -1443,7 +1444,34 @@ if ( window.onbeforeunload === null &&
|
|||||||
|
|
||||||
assert.strictEqual( win.onbeforeunload, null, "onbeforeunload property on window object still equals null" );
|
assert.strictEqual( win.onbeforeunload, null, "onbeforeunload property on window object still equals null" );
|
||||||
|
|
||||||
|
// In old Safari beforeunload event will not fire on iframes
|
||||||
|
jQuery( win ).on( "unload", function() {
|
||||||
|
if ( !fired ) {
|
||||||
|
ok( true, "This is suppose to be true only in old Safari" );
|
||||||
|
checker();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
jQuery( win ).on( "beforeunload", function() {
|
||||||
|
|
||||||
|
// On iframe in IE6 beforeunload event will not
|
||||||
|
// fire if event is binded through window object,
|
||||||
|
// nevertheless, test should continue
|
||||||
|
window.setTimeout( function() {
|
||||||
|
if ( !forIE6 ) {
|
||||||
|
checker();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
win.onbeforeunload = function() {
|
win.onbeforeunload = function() {
|
||||||
|
if ( !forIE6 ) {
|
||||||
|
forIE6++;
|
||||||
|
checker();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function checker() {
|
||||||
assert.ok( true, "window.onbeforeunload handler is called" );
|
assert.ok( true, "window.onbeforeunload handler is called" );
|
||||||
iframe = jQuery( "<iframe src='data/iframe.html' />" );
|
iframe = jQuery( "<iframe src='data/iframe.html' />" );
|
||||||
|
|
||||||
@ -1466,7 +1494,7 @@ if ( window.onbeforeunload === null &&
|
|||||||
|
|
||||||
win.location.reload();
|
win.location.reload();
|
||||||
} );
|
} );
|
||||||
};
|
}
|
||||||
|
|
||||||
win.location.reload();
|
win.location.reload();
|
||||||
} );
|
} );
|
||||||
@ -2728,10 +2756,10 @@ QUnit.test( "Inline event result is returned (#13993)", function( assert ) {
|
|||||||
|
|
||||||
QUnit.test( ".off() removes the expando when there's no more data", function( assert ) {
|
QUnit.test( ".off() removes the expando when there's no more data", function( assert ) {
|
||||||
|
|
||||||
// Support: IE 8 only
|
// Support: IE 6-8
|
||||||
// IE 8 gets the expando removed via removeAttribute so the second assertion
|
// IE 6-8 gets the expando removed via removeAttribute so the second assertion
|
||||||
// won't be reached.
|
// won't be reached.
|
||||||
assert.expect( document.documentMode < 9 ? 1 : 2 );
|
assert.expect( /msie [876]\.0/i.test( navigator.userAgent ) ? 1 : 2 );
|
||||||
|
|
||||||
var key,
|
var key,
|
||||||
div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" );
|
div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" );
|
||||||
@ -2853,9 +2881,11 @@ QUnit.test( "originalEvent property for IE8", function( assert ) {
|
|||||||
QUnit.test( "originalEvent property for Chrome, Safari, Fx & Edge of simulated event", function( assert ) {
|
QUnit.test( "originalEvent property for Chrome, Safari, Fx & Edge of simulated event", function( assert ) {
|
||||||
var userAgent = window.navigator.userAgent;
|
var userAgent = window.navigator.userAgent;
|
||||||
|
|
||||||
if ( !( /firefox/i.test( userAgent ) || /safari/i.test( userAgent ) ) ) {
|
if ( !(/chrome/i.test( userAgent ) ||
|
||||||
|
/firefox/i.test( userAgent ) ||
|
||||||
|
/safari/i.test( userAgent ) ) ) {
|
||||||
assert.expect( 1 );
|
assert.expect( 1 );
|
||||||
assert.ok( true, "Assertions should run only in Chrome, Safari, Fx & Edge" );
|
assert.ok( true, "Assertions should run only in Chrome, Safari and FF" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2919,8 +2949,7 @@ if ( !( /firefox/i.test( window.navigator.userAgent ) ) ) {
|
|||||||
$text = jQuery( "#text1" ),
|
$text = jQuery( "#text1" ),
|
||||||
$radio = jQuery( "#radio1" ).trigger( "focus" );
|
$radio = jQuery( "#radio1" ).trigger( "focus" );
|
||||||
|
|
||||||
// Support: IE<11
|
// IE6-10 fire focus/blur events asynchronously; this is the resulting mess.
|
||||||
// IE8-10 fire focus/blur events asynchronously; this is the resulting mess.
|
|
||||||
// IE's browser window must be topmost for this to work properly!!
|
// IE's browser window must be topmost for this to work properly!!
|
||||||
QUnit.stop();
|
QUnit.stop();
|
||||||
$radio[ 0 ].focus();
|
$radio[ 0 ].focus();
|
||||||
|
@ -529,10 +529,10 @@ QUnit.test( "html(String) with HTML5 (Bug #6485)", function( assert ) {
|
|||||||
|
|
||||||
QUnit.test( "html(String) tag-hyphenated elements (Bug #1987)", function( assert ) {
|
QUnit.test( "html(String) tag-hyphenated elements (Bug #1987)", function( assert ) {
|
||||||
|
|
||||||
// Support: IE8
|
// Support: IE6-IE8
|
||||||
if ( /msie 8\.0/i.test( navigator.userAgent ) ) {
|
if ( /msie [876]\.0/i.test( navigator.userAgent ) ) {
|
||||||
assert.expect( 1 );
|
assert.expect( 1 );
|
||||||
assert.ok( true, "IE8 doesn't support custom elements" );
|
assert.ok( true, "IE6-8 doesn't support custom elements" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2348,22 +2348,22 @@ QUnit.test( "Ensure oldIE creates a new set on appendTo (#8894)", function( asse
|
|||||||
assert.strictEqual( jQuery( "<p/>" ).appendTo( "<div/>" ).end().length, jQuery( "<p>test</p>" ).appendTo( "<div/>" ).end().length, "Elements created with createElement and with createDocumentFragment should be treated alike" );
|
assert.strictEqual( jQuery( "<p/>" ).appendTo( "<div/>" ).end().length, jQuery( "<p>test</p>" ).appendTo( "<div/>" ).end().length, "Elements created with createElement and with createDocumentFragment should be treated alike" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "html() - script exceptions bubble (#11743)", function() {
|
QUnit.test( "html() - script exceptions bubble (#11743)", function( assert ) {
|
||||||
|
|
||||||
expect( 2 );
|
assert.expect( 2 );
|
||||||
|
|
||||||
throws( function() {
|
assert.throws( function() {
|
||||||
jQuery( "#qunit-fixture" ).html( "<script>undefined(); ok( false, 'Exception not thrown' );</script>" );
|
jQuery( "#qunit-fixture" ).html( "<script>undefined(); ok( false, 'Exception not thrown' );</script>" );
|
||||||
ok( false, "Exception ignored" );
|
assert.ok( false, "Exception ignored" );
|
||||||
}, "Exception bubbled from inline script" );
|
}, "Exception bubbled from inline script" );
|
||||||
|
|
||||||
if ( jQuery.ajax ) {
|
if ( jQuery.ajax ) {
|
||||||
throws( function() {
|
assert.throws( function() {
|
||||||
jQuery( "#qunit-fixture" ).html( "<script src='data/badcall.js'></script>" );
|
jQuery( "#qunit-fixture" ).html( "<script src='data/badcall.js'></script>" );
|
||||||
ok( false, "Exception ignored" );
|
assert.ok( false, "Exception ignored" );
|
||||||
}, "Exception thrown in remote script" );
|
}, "Exception thrown in remote script" );
|
||||||
} else {
|
} else {
|
||||||
ok( true, "No jQuery.ajax" );
|
assert.ok( true, "No jQuery.ajax" );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -181,16 +181,18 @@ testIframe( "offset/absolute", "absolute", function( $, window, document, assert
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
testIframe( "offset/relative", "relative", function( $, window, document, assert ) {
|
testIframe( "offset/relative", "relative", function( $, window, document, assert ) {
|
||||||
assert.expect( 64 );
|
assert.expect( 60 );
|
||||||
|
|
||||||
var tests;
|
var ie, tests;
|
||||||
|
|
||||||
|
// IE is collapsing the top margin of 1px; detect and adjust accordingly
|
||||||
|
ie = $("#relative-1").offset().top === 6;
|
||||||
|
|
||||||
// get offset
|
// get offset
|
||||||
tests = [
|
tests = [
|
||||||
{ "id": "#relative-1", "top": 7, "left": 7 },
|
{ "id": "#relative-1", "top": ie ? 6 : 7, "left": 7 },
|
||||||
{ "id": "#relative-1-1", "top": 15, "left": 15 },
|
{ "id": "#relative-1-1", "top": ie ? 13 : 15, "left": 15 },
|
||||||
{ "id": "#relative-2", "top": 142, "left": 27 },
|
{ "id": "#relative-2", "top": ie ? 141 : 142, "left": 27 }
|
||||||
{ "id": "#relative-2-1", "top": 149, "left": 52 }
|
|
||||||
];
|
];
|
||||||
jQuery.each( tests, function() {
|
jQuery.each( tests, function() {
|
||||||
assert.equal( $( this[ "id" ] ).offset().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').offset().top" );
|
assert.equal( $( this[ "id" ] ).offset().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').offset().top" );
|
||||||
@ -199,10 +201,9 @@ testIframe( "offset/relative", "relative", function( $, window, document, assert
|
|||||||
|
|
||||||
// get position
|
// get position
|
||||||
tests = [
|
tests = [
|
||||||
{ "id": "#relative-1", "top": 6, "left": 6 },
|
{ "id": "#relative-1", "top": ie ? 5 : 6, "left": 6 },
|
||||||
{ "id": "#relative-1-1", "top": 5, "left": 5 },
|
{ "id": "#relative-1-1", "top": ie ? 4 : 5, "left": 5 },
|
||||||
{ "id": "#relative-2", "top": 141, "left": 26 },
|
{ "id": "#relative-2", "top": ie ? 140 : 141, "left": 26 }
|
||||||
{ "id": "#relative-2-1", "top": 5, "left": 5 }
|
|
||||||
];
|
];
|
||||||
jQuery.each( tests, function() {
|
jQuery.each( tests, function() {
|
||||||
assert.equal( $( this[ "id" ] ).position().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').position().top" );
|
assert.equal( $( this[ "id" ] ).position().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').position().top" );
|
||||||
@ -243,14 +244,17 @@ testIframe( "offset/relative", "relative", function( $, window, document, assert
|
|||||||
testIframe( "offset/static", "static", function( $, window, document, assert ) {
|
testIframe( "offset/static", "static", function( $, window, document, assert ) {
|
||||||
assert.expect( 80 );
|
assert.expect( 80 );
|
||||||
|
|
||||||
var tests;
|
var ie, tests;
|
||||||
|
|
||||||
|
// IE is collapsing the top margin of 1px; detect and adjust accordingly
|
||||||
|
ie = $("#static-1").offset().top === 6;
|
||||||
|
|
||||||
// get offset
|
// get offset
|
||||||
tests = [
|
tests = [
|
||||||
{ "id": "#static-1", "top": 7, "left": 7 },
|
{ "id": "#static-1", "top": ie ? 6 : 7, "left": 7 },
|
||||||
{ "id": "#static-1-1", "top": 15, "left": 15 },
|
{ "id": "#static-1-1", "top": ie ? 13 : 15, "left": 15 },
|
||||||
{ "id": "#static-1-1-1", "top": 23, "left": 23 },
|
{ "id": "#static-1-1-1", "top": ie ? 20 : 23, "left": 23 },
|
||||||
{ "id": "#static-2", "top": 122, left: 7 }
|
{ "id": "#static-2", "top": ie ? 121 : 122, left: 7 }
|
||||||
];
|
];
|
||||||
jQuery.each( tests, function() {
|
jQuery.each( tests, function() {
|
||||||
assert.equal( $( this[ "id" ] ).offset().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').offset().top" );
|
assert.equal( $( this[ "id" ] ).offset().top, this[ "top" ], "jQuery('" + this[ "id" ] + "').offset().top" );
|
||||||
@ -259,10 +263,10 @@ testIframe( "offset/static", "static", function( $, window, document, assert ) {
|
|||||||
|
|
||||||
// get position
|
// get position
|
||||||
tests = [
|
tests = [
|
||||||
{ "id": "#static-1", "top": 6, "left": 6 },
|
{ "id": "#static-1", "top": ie ? 5 : 6, "left": 6 },
|
||||||
{ "id": "#static-1-1", "top": 14, "left": 14 },
|
{ "id": "#static-1-1", "top": ie ? 12 : 14, "left": 14 },
|
||||||
{ "id": "#static-1-1-1", "top": 22, "left": 22 },
|
{ "id": "#static-1-1-1", "top": ie ? 19 : 22, "left": 22 },
|
||||||
{ "id": "#static-2", "top": 121, "left": 6 }
|
{ "id": "#static-2", "top": ie ? 120 : 121, "left": 6 }
|
||||||
];
|
];
|
||||||
jQuery.each( tests, function() {
|
jQuery.each( tests, function() {
|
||||||
assert.equal( $( this[ "id" ] ).position().top, this[ "top" ], "jQuery('" + this[ "top" ] + "').position().top" );
|
assert.equal( $( this[ "id" ] ).position().top, this[ "top" ], "jQuery('" + this[ "top" ] + "').position().top" );
|
||||||
@ -307,22 +311,25 @@ testIframe( "offset/static", "static", function( $, window, document, assert ) {
|
|||||||
testIframe( "offset/fixed", "fixed", function( $, window, document, assert ) {
|
testIframe( "offset/fixed", "fixed", function( $, window, document, assert ) {
|
||||||
assert.expect( 34 );
|
assert.expect( 34 );
|
||||||
|
|
||||||
var tests, $noTopLeft;
|
var ie, tests, $noTopLeft;
|
||||||
|
|
||||||
|
// IE is collapsing the top margin of 1px; detect and adjust accordingly
|
||||||
|
ie = $("#fixed-1").position().top === 2;
|
||||||
|
|
||||||
tests = [
|
tests = [
|
||||||
{
|
{
|
||||||
"id": "#fixed-1",
|
"id": "#fixed-1",
|
||||||
"offsetTop": 1001,
|
"offsetTop": 1001,
|
||||||
"offsetLeft": 1001,
|
"offsetLeft": 1001,
|
||||||
"positionTop": 0,
|
"positionTop": ie ? 2 : 0,
|
||||||
"positionLeft": 0
|
"positionLeft": ie ? 2 : 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "#fixed-2",
|
"id": "#fixed-2",
|
||||||
"offsetTop": 1021,
|
"offsetTop": 1021,
|
||||||
"offsetLeft": 1021,
|
"offsetLeft": 1021,
|
||||||
"positionTop": 20,
|
"positionTop": ie ? 22 : 20,
|
||||||
"positionLeft": 20
|
"positionLeft": ie ? 22 : 20
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -408,7 +415,7 @@ testIframe( "offset/scroll", "scroll", function( $, win, doc, assert ) {
|
|||||||
assert.expect( 28 );
|
assert.expect( 28 );
|
||||||
|
|
||||||
// If we're going to bastardize the tests, let's just DO it
|
// If we're going to bastardize the tests, let's just DO it
|
||||||
var ie = /msie 8/i.test( navigator.userAgent );
|
var ie = /msie [678]/i.test( navigator.userAgent );
|
||||||
|
|
||||||
if ( ie ) {
|
if ( ie ) {
|
||||||
assert.ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
|
assert.ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
|
||||||
@ -476,12 +483,20 @@ testIframe( "offset/scroll", "scroll", function( $, win, doc, assert ) {
|
|||||||
// Tests position after parent scrolling (#15239)
|
// Tests position after parent scrolling (#15239)
|
||||||
$( "#scroll-1" ).scrollTop( 0 );
|
$( "#scroll-1" ).scrollTop( 0 );
|
||||||
$( "#scroll-1" ).scrollLeft( 0 );
|
$( "#scroll-1" ).scrollLeft( 0 );
|
||||||
assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
|
if ( ie ) {
|
||||||
|
assert.ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
|
||||||
|
} else {
|
||||||
|
assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
|
||||||
|
}
|
||||||
assert.equal( $( "#scroll-1-1" ).position().left, 6, "jQuery('#scroll-1-1').position().left unaffected by parent scrolling" );
|
assert.equal( $( "#scroll-1-1" ).position().left, 6, "jQuery('#scroll-1-1').position().left unaffected by parent scrolling" );
|
||||||
|
|
||||||
$( "#scroll-1" ).scrollTop( 5 );
|
$( "#scroll-1" ).scrollTop( 5 );
|
||||||
$( "#scroll-1" ).scrollLeft( 5 );
|
$( "#scroll-1" ).scrollLeft( 5 );
|
||||||
assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
|
if ( ie ) {
|
||||||
|
assert.ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
|
||||||
|
} else {
|
||||||
|
assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
|
||||||
|
}
|
||||||
assert.equal( $( "#scroll-1-1" ).position().left, 6, "jQuery('#scroll-1-1').position().left unaffected by parent scrolling" );
|
assert.equal( $( "#scroll-1-1" ).position().left, 6, "jQuery('#scroll-1-1').position().left unaffected by parent scrolling" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -571,14 +586,16 @@ QUnit.test( "fractions (see #7730 and #7885)", function( assert ) {
|
|||||||
QUnit.test( "iframe scrollTop/Left (see gh-1945)", function( assert ) {
|
QUnit.test( "iframe scrollTop/Left (see gh-1945)", function( assert ) {
|
||||||
assert.expect( 2 );
|
assert.expect( 2 );
|
||||||
|
|
||||||
var ifDoc = jQuery( "#iframe" )[ 0 ].contentDocument;
|
var ifDoc = jQuery( "#iframe" )[ 0 ];
|
||||||
|
|
||||||
|
ifDoc = ifDoc.contentDocument || ifDoc.contentWindow.document;
|
||||||
|
|
||||||
// Mobile Safari and Android 2.3 resize the iframe by its content
|
// Mobile Safari and Android 2.3 resize the iframe by its content
|
||||||
// meaning it's not possible to scroll the iframe only its parent element.
|
// meaning it's not possible to scroll the iframe only its parent element.
|
||||||
// It seems (not confirmed) in android 4.0 it's not possible to scroll iframes from the code.
|
// It seems (not confirmed) in android 4.0 it's not possible to scroll iframes from the code.
|
||||||
if ( /iphone os/i.test( navigator.userAgent ) ||
|
if ( /iphone os/i.test( navigator.userAgent ) ||
|
||||||
/android 2\.3/i.test( navigator.userAgent ) ||
|
/android 2\.3/i.test( navigator.userAgent ) ||
|
||||||
/android 4\.0/i.test( navigator.userAgent ) ) {
|
/android 4\.0/i.test( navigator.userAgent ) ) {
|
||||||
assert.equal( true, true, "Can't scroll iframes in this environment" );
|
assert.equal( true, true, "Can't scroll iframes in this environment" );
|
||||||
assert.equal( true, true, "Can't scroll iframes in this environment" );
|
assert.equal( true, true, "Can't scroll iframes in this environment" );
|
||||||
|
|
||||||
@ -587,11 +604,11 @@ QUnit.test( "iframe scrollTop/Left (see gh-1945)", function( assert ) {
|
|||||||
// Tests scrollTop/Left with iframes
|
// Tests scrollTop/Left with iframes
|
||||||
jQuery( "#iframe" ).css( "width", "50px" ).css( "height", "50px" );
|
jQuery( "#iframe" ).css( "width", "50px" ).css( "height", "50px" );
|
||||||
|
|
||||||
// Support: IE8
|
// Support: IE6-8
|
||||||
// Need a doctype, otherwise IE will scroll it but will still show old values
|
// Need a doctype, otherwise IE will scroll it but will still show old values
|
||||||
ifDoc.write( "<!DOCTYPE><div style='width: 1000px; height: 1000px;'></div>" );
|
ifDoc.write( "<!DOCTYPE html><div style='width: 1000px; height: 1000px;'></div>" );
|
||||||
|
|
||||||
// Support: IE8
|
// Support: IE6-8
|
||||||
ifDoc.close();
|
ifDoc.close();
|
||||||
|
|
||||||
jQuery( ifDoc ).scrollTop( 200 );
|
jQuery( ifDoc ).scrollTop( 200 );
|
||||||
|
@ -275,7 +275,7 @@ testIframe(
|
|||||||
"selector/html5_selector",
|
"selector/html5_selector",
|
||||||
"attributes - jQuery.attr",
|
"attributes - jQuery.attr",
|
||||||
function( jQuery, window, document, assert ) {
|
function( jQuery, window, document, assert ) {
|
||||||
assert.expect( 37 );
|
assert.expect( 35 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of elements with the given IDs
|
* Returns an array of elements with the given IDs
|
||||||
@ -333,10 +333,10 @@ testIframe(
|
|||||||
t( "Attribute Exists", "[indeterminate]", [] );
|
t( "Attribute Exists", "[indeterminate]", [] );
|
||||||
t( "Attribute Exists", "[ismap]", [ "img1" ] );
|
t( "Attribute Exists", "[ismap]", [ "img1" ] );
|
||||||
t( "Attribute Exists", "[itemscope]", [ "div1" ] );
|
t( "Attribute Exists", "[itemscope]", [ "div1" ] );
|
||||||
t( "Attribute Exists", "[loop]", [ "video1" ] );
|
// t( "Attribute Exists", "[loop]", [ "video1" ] ); // IE 6/7 cannot differentiate here. loop is also used on img, input, and marquee tags as well as video/audio. getAttributeNode unfortunately also retrieves the property value.
|
||||||
t( "Attribute Exists", "[multiple]", [ "select1" ] );
|
t( "Attribute Exists", "[multiple]", [ "select1" ] );
|
||||||
t( "Attribute Exists", "[muted]", [ "audio1" ] );
|
t( "Attribute Exists", "[muted]", [ "audio1" ] );
|
||||||
t( "Attribute Exists", "[nohref]", [ "area1" ] );
|
// t( "Attribute Exists", "[nohref]", [ "area1" ] ); // IE 6/7 keep this set to false regardless of presence. The attribute node is not retrievable.
|
||||||
t( "Attribute Exists", "[noresize]", [ "textarea1" ] );
|
t( "Attribute Exists", "[noresize]", [ "textarea1" ] );
|
||||||
t( "Attribute Exists", "[noshade]", [ "hr1" ] );
|
t( "Attribute Exists", "[noshade]", [ "hr1" ] );
|
||||||
t( "Attribute Exists", "[nowrap]", [ "td1", "div1" ] );
|
t( "Attribute Exists", "[nowrap]", [ "td1", "div1" ] );
|
||||||
|
@ -20,8 +20,12 @@ var computedSupport = getComputedSupport( jQuery.support );
|
|||||||
QUnit.test( "zoom of doom (#13089)", function( assert ) {
|
QUnit.test( "zoom of doom (#13089)", function( assert ) {
|
||||||
assert.expect( 1 );
|
assert.expect( 1 );
|
||||||
|
|
||||||
assert.ok( !document.body.style.zoom, "No zoom added to the body" );
|
if ( computedSupport.inlineBlockNeedsLayout ) {
|
||||||
} );
|
ok( document.body.style.zoom, "Added a zoom to the body (#11048, #12869)" );
|
||||||
|
} else {
|
||||||
|
ok( !document.body.style.zoom, "No zoom added to the body" );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if ( jQuery.css ) {
|
if ( jQuery.css ) {
|
||||||
testIframeWithCallback(
|
testIframeWithCallback(
|
||||||
@ -79,7 +83,9 @@ testIframeWithCallback(
|
|||||||
if ( /edge\//i.test( userAgent ) ) {
|
if ( /edge\//i.test( userAgent ) ) {
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": true,
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
@ -89,9 +95,13 @@ testIframeWithCallback(
|
|||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
"focusin": false,
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": true,
|
"noCloneChecked": true,
|
||||||
@ -107,12 +117,55 @@ testIframeWithCallback(
|
|||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": true,
|
"reliableMarginLeft": true,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /opera.*version\/12\.1/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": true,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": true,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": true,
|
||||||
|
"radioValue": false,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": false,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
} else if ( /(msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) {
|
} else if ( /(msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) {
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": false,
|
"boxSizingReliable": false,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
@ -122,9 +175,13 @@ testIframeWithCallback(
|
|||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
"focusin": true,
|
"focusin": true,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": false,
|
"noCloneChecked": false,
|
||||||
@ -140,27 +197,34 @@ testIframeWithCallback(
|
|||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": true,
|
"reliableMarginLeft": true,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
} else if ( /msie 9\.0/i.test( userAgent ) ) {
|
} else if ( /msie 9\.0/i.test( userAgent ) ) {
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
"boxSizingReliable": false,
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
"checkOn": true,
|
"checkOn": true,
|
||||||
"clearCloneStyle": false,
|
"clearCloneStyle": false,
|
||||||
"cors": false,
|
"cors": true,
|
||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
"focusin": true,
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": false,
|
"noCloneChecked": true,
|
||||||
"noCloneEvent": true,
|
"noCloneEvent": true,
|
||||||
"opacity": true,
|
"opacity": true,
|
||||||
"optDisabled": true,
|
"optDisabled": true,
|
||||||
@ -168,17 +232,20 @@ testIframeWithCallback(
|
|||||||
"ownFirst": true,
|
"ownFirst": true,
|
||||||
"pixelMarginRight": true,
|
"pixelMarginRight": true,
|
||||||
"pixelPosition": true,
|
"pixelPosition": true,
|
||||||
"radioValue": false,
|
"radioValue": true,
|
||||||
"reliableHiddenOffsets": true,
|
"reliableHiddenOffsets": true,
|
||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": true,
|
"reliableMarginLeft": true,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
} else if ( /msie 8\.0/i.test( userAgent ) ) {
|
} else if ( /msie 8\.0/i.test( userAgent ) ) {
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": false,
|
"attributes": false,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": false,
|
"boxSizingReliable": false,
|
||||||
"change": false,
|
"change": false,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
@ -188,9 +255,13 @@ testIframeWithCallback(
|
|||||||
"createHTMLDocument": false,
|
"createHTMLDocument": false,
|
||||||
"cssFloat": false,
|
"cssFloat": false,
|
||||||
"deleteExpando": false,
|
"deleteExpando": false,
|
||||||
|
"enctype": true,
|
||||||
"focusin": true,
|
"focusin": true,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": false,
|
"html5Clone": false,
|
||||||
"htmlSerialize": false,
|
"htmlSerialize": false,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": false,
|
"input": false,
|
||||||
"leadingWhitespace": false,
|
"leadingWhitespace": false,
|
||||||
"noCloneChecked": false,
|
"noCloneChecked": false,
|
||||||
@ -206,7 +277,88 @@ testIframeWithCallback(
|
|||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": false,
|
"reliableMarginLeft": false,
|
||||||
"style": false,
|
"style": false,
|
||||||
"submit": false
|
"submit": false,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /msie 7\.0/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": false,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": false,
|
||||||
|
"change": false,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": false,
|
||||||
|
"createHTMLDocument": false,
|
||||||
|
"cssFloat": false,
|
||||||
|
"deleteExpando": false,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": true,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": false,
|
||||||
|
"htmlSerialize": false,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": false,
|
||||||
|
"leadingWhitespace": false,
|
||||||
|
"noCloneChecked": false,
|
||||||
|
"noCloneEvent": false,
|
||||||
|
"opacity": false,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": false,
|
||||||
|
"ownFirst": false,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": false,
|
||||||
|
"radioValue": false,
|
||||||
|
"reliableHiddenOffsets": false,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": false,
|
||||||
|
"style": false,
|
||||||
|
"submit": false,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /msie 6\.0/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": false,
|
||||||
|
"attributes": false,
|
||||||
|
"boxSizing": false,
|
||||||
|
"boxSizingReliable": false,
|
||||||
|
"change": false,
|
||||||
|
"checkClone": false,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": false,
|
||||||
|
"createHTMLDocument": false,
|
||||||
|
"cssFloat": false,
|
||||||
|
"deleteExpando": false,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": true,
|
||||||
|
"getSetAttribute": false,
|
||||||
|
"hrefNormalized": false,
|
||||||
|
"html5Clone": false,
|
||||||
|
"htmlSerialize": false,
|
||||||
|
"inlineBlockNeedsLayout": true,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": false,
|
||||||
|
"noCloneChecked": false,
|
||||||
|
"noCloneEvent": false,
|
||||||
|
"opacity": false,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": false,
|
||||||
|
"ownFirst": false,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": false,
|
||||||
|
"radioValue": false,
|
||||||
|
"reliableHiddenOffsets": false,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": false,
|
||||||
|
"style": false,
|
||||||
|
"submit": false,
|
||||||
|
"tbody": false
|
||||||
};
|
};
|
||||||
} else if ( /chrome/i.test( userAgent ) ) {
|
} else if ( /chrome/i.test( userAgent ) ) {
|
||||||
|
|
||||||
@ -214,7 +366,9 @@ testIframeWithCallback(
|
|||||||
// Android browser on Android >= 4.4).
|
// Android browser on Android >= 4.4).
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": true,
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
@ -224,9 +378,13 @@ testIframeWithCallback(
|
|||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
"focusin": false,
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": true,
|
"noCloneChecked": true,
|
||||||
@ -242,12 +400,15 @@ testIframeWithCallback(
|
|||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": true,
|
"reliableMarginLeft": true,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
} else if ( /9\.0(\.\d+|) safari/i.test( userAgent ) ) {
|
} else if ( /9\.0(\.\d+|) safari/i.test( userAgent ) ) {
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": true,
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
@ -257,9 +418,13 @@ testIframeWithCallback(
|
|||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
"focusin": false,
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": true,
|
"noCloneChecked": true,
|
||||||
@ -275,12 +440,15 @@ testIframeWithCallback(
|
|||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": true,
|
"reliableMarginLeft": true,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
} else if ( /8\.0(\.\d+|) safari/i.test( userAgent ) ) {
|
} else if ( /8\.0(\.\d+|) safari/i.test( userAgent ) ) {
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": true,
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
@ -290,9 +458,13 @@ testIframeWithCallback(
|
|||||||
"createHTMLDocument": false,
|
"createHTMLDocument": false,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
"focusin": false,
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": true,
|
"noCloneChecked": true,
|
||||||
@ -308,145 +480,15 @@ testIframeWithCallback(
|
|||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": true,
|
"reliableMarginLeft": true,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
} else if ( /firefox/i.test( userAgent ) ) {
|
} else if ( /5\.[01](\.\d+|) safari/i.test( userAgent ) ) {
|
||||||
expected = {
|
|
||||||
"ajax": true,
|
|
||||||
"attributes": true,
|
|
||||||
"boxSizingReliable": true,
|
|
||||||
"change": true,
|
|
||||||
"checkClone": true,
|
|
||||||
"checkOn": true,
|
|
||||||
"clearCloneStyle": true,
|
|
||||||
"cors": true,
|
|
||||||
"createHTMLDocument": true,
|
|
||||||
"cssFloat": true,
|
|
||||||
"deleteExpando": true,
|
|
||||||
"focusin": false,
|
|
||||||
"html5Clone": true,
|
|
||||||
"htmlSerialize": true,
|
|
||||||
"input": true,
|
|
||||||
"leadingWhitespace": true,
|
|
||||||
"noCloneChecked": true,
|
|
||||||
"noCloneEvent": true,
|
|
||||||
"opacity": true,
|
|
||||||
"optDisabled": true,
|
|
||||||
"optSelected": true,
|
|
||||||
"ownFirst": true,
|
|
||||||
"pixelMarginRight": true,
|
|
||||||
"pixelPosition": true,
|
|
||||||
"radioValue": true,
|
|
||||||
"reliableHiddenOffsets": true,
|
|
||||||
"reliableMarginRight": true,
|
|
||||||
"reliableMarginLeft": false,
|
|
||||||
"style": true,
|
|
||||||
"submit": true
|
|
||||||
};
|
|
||||||
} else if ( /iphone os 9_/i.test( userAgent ) ) {
|
|
||||||
expected = {
|
|
||||||
"ajax": true,
|
|
||||||
"attributes": true,
|
|
||||||
"boxSizingReliable": true,
|
|
||||||
"change": true,
|
|
||||||
"checkClone": true,
|
|
||||||
"checkOn": true,
|
|
||||||
"clearCloneStyle": true,
|
|
||||||
"cors": true,
|
|
||||||
"createHTMLDocument": true,
|
|
||||||
"cssFloat": true,
|
|
||||||
"deleteExpando": true,
|
|
||||||
"focusin": false,
|
|
||||||
"gBCRDimensions": true,
|
|
||||||
"html5Clone": true,
|
|
||||||
"htmlSerialize": true,
|
|
||||||
"input": true,
|
|
||||||
"leadingWhitespace": true,
|
|
||||||
"noCloneChecked": true,
|
|
||||||
"noCloneEvent": true,
|
|
||||||
"opacity": true,
|
|
||||||
"optDisabled": true,
|
|
||||||
"optSelected": true,
|
|
||||||
"ownFirst": true,
|
|
||||||
"pixelMarginRight": true,
|
|
||||||
"pixelPosition": false,
|
|
||||||
"radioValue": true,
|
|
||||||
"reliableHiddenOffsets": true,
|
|
||||||
"reliableMarginRight": true,
|
|
||||||
"reliableMarginLeft": true,
|
|
||||||
"style": true,
|
|
||||||
"submit": true
|
|
||||||
};
|
|
||||||
} else if ( /iphone os 8_/i.test( userAgent ) ) {
|
|
||||||
expected = {
|
|
||||||
"ajax": true,
|
|
||||||
"attributes": true,
|
|
||||||
"boxSizingReliable": true,
|
|
||||||
"change": true,
|
|
||||||
"checkClone": true,
|
|
||||||
"checkOn": true,
|
|
||||||
"clearCloneStyle": true,
|
|
||||||
"cors": true,
|
|
||||||
"createHTMLDocument": false,
|
|
||||||
"cssFloat": true,
|
|
||||||
"deleteExpando": true,
|
|
||||||
"focusin": false,
|
|
||||||
"html5Clone": true,
|
|
||||||
"htmlSerialize": true,
|
|
||||||
"input": true,
|
|
||||||
"leadingWhitespace": true,
|
|
||||||
"noCloneChecked": true,
|
|
||||||
"noCloneEvent": true,
|
|
||||||
"opacity": true,
|
|
||||||
"optDisabled": true,
|
|
||||||
"optSelected": true,
|
|
||||||
"ownFirst": true,
|
|
||||||
"pixelMarginRight": true,
|
|
||||||
"pixelPosition": false,
|
|
||||||
"radioValue": true,
|
|
||||||
"reliableHiddenOffsets": true,
|
|
||||||
"reliableMarginRight": true,
|
|
||||||
"reliableMarginLeft": true,
|
|
||||||
"style": true,
|
|
||||||
"submit": true
|
|
||||||
};
|
|
||||||
} else if ( /iphone os 7_/i.test( userAgent ) ) {
|
|
||||||
expected = {
|
|
||||||
"ajax": true,
|
|
||||||
"attributes": true,
|
|
||||||
"boxSizingReliable": true,
|
|
||||||
"change": true,
|
|
||||||
"checkClone": true,
|
|
||||||
"checkOn": true,
|
|
||||||
"clearCloneStyle": true,
|
|
||||||
"cors": true,
|
|
||||||
"createHTMLDocument": true,
|
|
||||||
"cssFloat": true,
|
|
||||||
"deleteExpando": true,
|
|
||||||
"focusin": false,
|
|
||||||
"html5Clone": true,
|
|
||||||
"htmlSerialize": true,
|
|
||||||
"input": true,
|
|
||||||
"leadingWhitespace": true,
|
|
||||||
"noCloneChecked": true,
|
|
||||||
"noCloneEvent": true,
|
|
||||||
"opacity": true,
|
|
||||||
"optDisabled": true,
|
|
||||||
"optSelected": true,
|
|
||||||
"ownFirst": true,
|
|
||||||
"pixelMarginRight": true,
|
|
||||||
"pixelPosition": false,
|
|
||||||
"radioValue": true,
|
|
||||||
"reliableHiddenOffsets": true,
|
|
||||||
"reliableMarginRight": true,
|
|
||||||
"reliableMarginLeft": true,
|
|
||||||
"style": true,
|
|
||||||
"submit": true
|
|
||||||
};
|
|
||||||
} else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
|
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": true,
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": false,
|
"checkClone": false,
|
||||||
@ -456,9 +498,13 @@ testIframeWithCallback(
|
|||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
"focusin": false,
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": true,
|
"noCloneChecked": true,
|
||||||
@ -474,40 +520,328 @@ testIframeWithCallback(
|
|||||||
"reliableMarginRight": true,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": false,
|
"reliableMarginLeft": false,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
} else if ( /android 2\.3/i.test( userAgent ) ) {
|
} else if ( /6\.0(\.\d+|) safari/i.test( userAgent ) ) {
|
||||||
expected = {
|
expected = {
|
||||||
"ajax": true,
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
"attributes": true,
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
"boxSizingReliable": true,
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": true,
|
"checkClone": true,
|
||||||
"checkOn": false,
|
"checkOn": true,
|
||||||
"clearCloneStyle": false,
|
"clearCloneStyle": true,
|
||||||
"cors": true,
|
"cors": true,
|
||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
"deleteExpando": true,
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
"focusin": false,
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
"html5Clone": true,
|
"html5Clone": true,
|
||||||
"htmlSerialize": true,
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
"input": true,
|
"input": true,
|
||||||
"leadingWhitespace": true,
|
"leadingWhitespace": true,
|
||||||
"noCloneChecked": true,
|
"noCloneChecked": true,
|
||||||
"noCloneEvent": true,
|
"noCloneEvent": true,
|
||||||
"opacity": true,
|
"opacity": true,
|
||||||
"optDisabled": false,
|
"optDisabled": true,
|
||||||
"optSelected": true,
|
"optSelected": true,
|
||||||
"ownFirst": true,
|
"ownFirst": true,
|
||||||
"pixelMarginRight": true,
|
"pixelMarginRight": true,
|
||||||
"pixelPosition": false,
|
"pixelPosition": false,
|
||||||
"radioValue": true,
|
"radioValue": true,
|
||||||
"reliableHiddenOffsets": true,
|
"reliableHiddenOffsets": true,
|
||||||
"reliableMarginRight": false,
|
"reliableMarginRight": true,
|
||||||
"reliableMarginLeft": true,
|
"reliableMarginLeft": true,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /firefox/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": true,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": true,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": true,
|
||||||
|
"radioValue": true,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": false,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /iphone os 9_/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": true,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": true,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": false,
|
||||||
|
"radioValue": true,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": true,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /iphone os 8_/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": false,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": true,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": false,
|
||||||
|
"radioValue": true,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": true,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /iphone os 7_/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": true,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": true,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": false,
|
||||||
|
"radioValue": true,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": true,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /iphone os 6_/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": true,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": true,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": true,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": false,
|
||||||
|
"radioValue": true,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": true,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": false,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": true,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": false,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": true,
|
||||||
|
"radioValue": true,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": true,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
|
};
|
||||||
|
} else if ( /android 2\.3/i.test( userAgent ) ) {
|
||||||
|
expected = {
|
||||||
|
"ajax": true,
|
||||||
|
"appendChecked": true,
|
||||||
|
"attributes": true,
|
||||||
|
"boxSizing": true,
|
||||||
|
"boxSizingReliable": true,
|
||||||
|
"change": true,
|
||||||
|
"checkClone": true,
|
||||||
|
"checkOn": true,
|
||||||
|
"clearCloneStyle": false,
|
||||||
|
"cors": true,
|
||||||
|
"createHTMLDocument": true,
|
||||||
|
"cssFloat": true,
|
||||||
|
"deleteExpando": true,
|
||||||
|
"enctype": true,
|
||||||
|
"focusin": false,
|
||||||
|
"getSetAttribute": true,
|
||||||
|
"hrefNormalized": true,
|
||||||
|
"html5Clone": true,
|
||||||
|
"htmlSerialize": true,
|
||||||
|
"inlineBlockNeedsLayout": false,
|
||||||
|
"input": true,
|
||||||
|
"leadingWhitespace": true,
|
||||||
|
"noCloneChecked": true,
|
||||||
|
"noCloneEvent": true,
|
||||||
|
"opacity": true,
|
||||||
|
"optDisabled": true,
|
||||||
|
"optSelected": false,
|
||||||
|
"ownFirst": true,
|
||||||
|
"pixelMarginRight": true,
|
||||||
|
"pixelPosition": true,
|
||||||
|
"radioValue": true,
|
||||||
|
"reliableHiddenOffsets": true,
|
||||||
|
"reliableMarginRight": true,
|
||||||
|
"reliableMarginLeft": true,
|
||||||
|
"style": true,
|
||||||
|
"submit": true,
|
||||||
|
"tbody": true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user