mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Edited comments and minor adjustments. Fixes #13553. Closes gh-1195.
This commit is contained in:
parent
ae3524642c
commit
79992d7523
@ -163,3 +163,4 @@ Adam Coulombe <me@adam.co>
|
|||||||
Andrew Plummer <plummer.andrew@gmail.com>
|
Andrew Plummer <plummer.andrew@gmail.com>
|
||||||
Nguyen Phuc Lam <ruado1987@gmail.com>
|
Nguyen Phuc Lam <ruado1987@gmail.com>
|
||||||
Dmitry Gusev <dmitry.gusev@gmail.com>
|
Dmitry Gusev <dmitry.gusev@gmail.com>
|
||||||
|
Michał Z. Gołębiowski <michal.golebiowski@laboratorium.ee>
|
||||||
|
@ -181,7 +181,7 @@ function uploadToCDN( next ) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
cmds.push( next );
|
cmds.push( next );
|
||||||
|
|
||||||
steps.apply( this, cmds );
|
steps.apply( this, cmds );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ function benchmark(fn, times, name){
|
|||||||
var s = fn.indexOf('{')+1,
|
var s = fn.indexOf('{')+1,
|
||||||
e = fn.lastIndexOf('}');
|
e = fn.lastIndexOf('}');
|
||||||
fn = fn.substring(s,e);
|
fn = fn.substring(s,e);
|
||||||
|
|
||||||
return benchmarkString(fn, times, name);
|
return benchmarkString(fn, times, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<script src="../dist/jquery.js"></script>
|
<script src="../dist/jquery.js"></script>
|
||||||
<script>
|
<script>
|
||||||
jQuery(function(){
|
jQuery(function(){
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var events = [], num = 400, exec = false;
|
var events = [], num = 400, exec = false;
|
||||||
|
@ -6,42 +6,42 @@
|
|||||||
|
|
||||||
var SIZE = 1e4,
|
var SIZE = 1e4,
|
||||||
LOOPS = 500;
|
LOOPS = 500;
|
||||||
|
|
||||||
var arr = new Array(SIZE);
|
var arr = new Array(SIZE);
|
||||||
for ( var i=arr.length-1; i >= 0; --i )
|
for ( var i = arr.length - 1; i >= 0; --i )
|
||||||
arr[i] = 0;
|
arr[i] = 0;
|
||||||
|
|
||||||
var t = new Date;
|
var t = new Date;
|
||||||
for ( i=0; i < LOOPS; i++ )
|
for ( i = 0; i < LOOPS; i++ )
|
||||||
arr.slice(0);
|
arr.slice(0);
|
||||||
var tslice = new Date - t;
|
var tslice = new Date - t;
|
||||||
|
|
||||||
t = new Date;
|
t = new Date;
|
||||||
for ( i=0; i < LOOPS; i++ )
|
for ( i = 0; i < LOOPS; i++ )
|
||||||
arr.concat();
|
arr.concat();
|
||||||
var tconcat = new Date - t;
|
var tconcat = new Date - t;
|
||||||
|
|
||||||
// clone() is just to see how fast built-ins are
|
// clone() is just to see how fast built-ins are
|
||||||
t = new Date;
|
t = new Date;
|
||||||
for ( i=0; i < LOOPS; i++ )
|
for ( i = 0; i < LOOPS; i++ )
|
||||||
clone(arr);
|
clone(arr);
|
||||||
var tclone = new Date - t;
|
var tclone = new Date - t;
|
||||||
|
|
||||||
alert([
|
alert([
|
||||||
'slice:'+tslice,
|
'slice:'+tslice,
|
||||||
'concat:'+tconcat,
|
'concat:'+tconcat,
|
||||||
'clone:'+tclone
|
'clone:'+tclone
|
||||||
].join('\n'));
|
].join('\n'));
|
||||||
|
|
||||||
|
|
||||||
function clone(arr){
|
function clone(arr){
|
||||||
var i = arr.length,
|
var i = arr.length,
|
||||||
copy = new Array(i);
|
copy = new Array(i);
|
||||||
|
|
||||||
while (i--)
|
while (i--)
|
||||||
copy[i] = arr[i];
|
copy[i] = arr[i];
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@ var
|
|||||||
// Document location
|
// Document location
|
||||||
ajaxLocParts,
|
ajaxLocParts,
|
||||||
ajaxLocation,
|
ajaxLocation,
|
||||||
|
|
||||||
ajax_nonce = jQuery.now(),
|
ajax_nonce = jQuery.now(),
|
||||||
|
|
||||||
ajax_rquery = /\?/,
|
ajax_rquery = /\?/,
|
||||||
@ -140,7 +140,7 @@ jQuery.fn.load = function( url, params, callback ) {
|
|||||||
off = url.indexOf(" ");
|
off = url.indexOf(" ");
|
||||||
|
|
||||||
if ( off >= 0 ) {
|
if ( off >= 0 ) {
|
||||||
selector = url.slice( off, url.length );
|
selector = url.slice( off );
|
||||||
url = url.slice( 0, off );
|
url = url.slice( 0, off );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,10 +427,11 @@ 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 (#5866: IE7 issue with protocol-less urls)
|
// Add protocol if not provided (prefilters might expect it)
|
||||||
// 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 || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
|
||||||
|
.replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
||||||
|
|
||||||
// Alias method option to type as per ticket #12004
|
// Alias method option to type as per ticket #12004
|
||||||
s.type = options.method || options.type || s.method || s.type;
|
s.type = options.method || options.type || s.method || s.type;
|
||||||
|
@ -20,8 +20,8 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
|||||||
if ( elem.nodeType === 9 ) {
|
if ( elem.nodeType === 9 ) {
|
||||||
doc = elem.documentElement;
|
doc = elem.documentElement;
|
||||||
|
|
||||||
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
|
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
|
||||||
// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
|
// whichever is greatest
|
||||||
return Math.max(
|
return Math.max(
|
||||||
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
|
elem.body[ "scroll" + name ], doc[ "scroll" + name ],
|
||||||
elem.body[ "offset" + name ], doc[ "offset" + name ],
|
elem.body[ "offset" + name ], doc[ "offset" + name ],
|
||||||
|
4
src/effects.js
vendored
4
src/effects.js
vendored
@ -440,8 +440,8 @@ Tween.propHooks = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Remove in 2.0 - this supports IE8's panic based approach
|
// Support: IE9
|
||||||
// to setting things on disconnected nodes
|
// Panic based approach to setting things on disconnected nodes
|
||||||
|
|
||||||
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
||||||
set: function( tween ) {
|
set: function( tween ) {
|
||||||
|
@ -66,7 +66,7 @@ jQuery.event = {
|
|||||||
tmp = rtypenamespace.exec( types[t] ) || [];
|
tmp = rtypenamespace.exec( types[t] ) || [];
|
||||||
type = origType = tmp[1];
|
type = origType = tmp[1];
|
||||||
namespaces = ( tmp[2] || "" ).split( "." ).sort();
|
namespaces = ( tmp[2] || "" ).split( "." ).sort();
|
||||||
|
|
||||||
// There *must* be a type, no attaching namespace-only handlers
|
// There *must* be a type, no attaching namespace-only handlers
|
||||||
if ( !type ) {
|
if ( !type ) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -1468,7 +1468,7 @@ module( "ajax", {
|
|||||||
strictEqual( ajaxXML.find("tab").length, 3, "Parsed node was added properly" );
|
strictEqual( ajaxXML.find("tab").length, 3, "Parsed node was added properly" );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ajaxTest( "#13292 - jQuery.ajax() - converter is bypassed for 204 requests", 3, {
|
ajaxTest( "#13292 - jQuery.ajax() - converter is bypassed for 204 requests", 3, {
|
||||||
url: "data/nocontent.php",
|
url: "data/nocontent.php",
|
||||||
dataType: "testing",
|
dataType: "testing",
|
||||||
|
@ -446,7 +446,7 @@ test( "attr(String, Object)", function() {
|
|||||||
|
|
||||||
// Setting attributes on svg elements (bug #3116)
|
// Setting attributes on svg elements (bug #3116)
|
||||||
var $svg = jQuery(
|
var $svg = jQuery(
|
||||||
"<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' baseProfile='full' width='200' height='200'>" +
|
"<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' baseProfile='full' width='200' height='200'>" +
|
||||||
|
|
||||||
"<circle cx='200' cy='200' r='150' />" +
|
"<circle cx='200' cy='200' r='150' />" +
|
||||||
"</svg>"
|
"</svg>"
|
||||||
|
Loading…
Reference in New Issue
Block a user