mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Release: fix revert artefacts
This commit is contained in:
parent
0a98623abb
commit
ae88b3971c
11
src/core.js
11
src/core.js
@ -269,16 +269,19 @@ jQuery.extend( {
|
||||
code = jQuery.trim( code );
|
||||
|
||||
if ( code ) {
|
||||
|
||||
// If the code includes a valid, prologue position
|
||||
// strict mode pragma, execute code by injecting a
|
||||
// script tag into the document.
|
||||
if ( code.indexOf("use strict") === 1 ) {
|
||||
script = document.createElement("script");
|
||||
if ( code.indexOf( "use strict" ) === 1 ) {
|
||||
script = document.createElement( "script" );
|
||||
script.text = code;
|
||||
document.head.appendChild( script ).parentNode.removeChild( script );
|
||||
} else {
|
||||
// Otherwise, avoid the DOM node creation, insertion
|
||||
// and removal by using an indirect global eval
|
||||
|
||||
// Otherwise, avoid the DOM node creation, insertion
|
||||
// and removal by using an indirect global eval
|
||||
|
||||
indirect( code );
|
||||
}
|
||||
}
|
||||
|
13
src/css.js
13
src/css.js
@ -415,6 +415,19 @@ jQuery.each( [ "height", "width" ], function( i, name ) {
|
||||
};
|
||||
} );
|
||||
|
||||
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
||||
function( elem, computed ) {
|
||||
if ( computed ) {
|
||||
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
||||
elem.getBoundingClientRect().left -
|
||||
swap( elem, { marginLeft: 0 }, function() {
|
||||
return elem.getBoundingClientRect().left;
|
||||
} )
|
||||
) + "px";
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// These hooks are used by animate to expand properties
|
||||
jQuery.each( {
|
||||
margin: "",
|
||||
|
5
src/effects.js
vendored
5
src/effects.js
vendored
@ -401,8 +401,9 @@ jQuery.speed = function( speed, easing, fn ) {
|
||||
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
|
||||
};
|
||||
|
||||
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
|
||||
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
|
||||
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?
|
||||
opt.duration : opt.duration in jQuery.fx.speeds ?
|
||||
jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
|
||||
|
||||
// Normalize opt.queue - true/undefined/null -> "fx"
|
||||
if ( opt.queue == null || opt.queue === true ) {
|
||||
|
@ -1628,10 +1628,10 @@ if ( typeof window.ArrayBuffer === "undefined" || typeof new XMLHttpRequest().re
|
||||
// Global events get confused by the exception
|
||||
global: false,
|
||||
success: function() {
|
||||
ok( false, "Success." );
|
||||
assert.ok( false, "Success." );
|
||||
},
|
||||
error: function() {
|
||||
ok( false, "Error." );
|
||||
assert.ok( false, "Error." );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -2297,7 +2297,7 @@ QUnit.test( "html() - script exceptions bubble (#11743)", function( assert ) {
|
||||
if ( jQuery.ajax ) {
|
||||
var onerror = window.onerror;
|
||||
window.onerror = function() {
|
||||
ok( true, "Exception thrown in remote script" );
|
||||
assert.ok( true, "Exception thrown in remote script" );
|
||||
};
|
||||
|
||||
jQuery("#qunit-fixture").html("<script src='data/badcall.js'></script>");
|
||||
|
Loading…
Reference in New Issue
Block a user