mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Remove $("body") case; $(document.body) is 2x faster.
This commit is contained in:
parent
abd2a07498
commit
9ebc27db54
@ -90,15 +90,6 @@ jQuery.fn = jQuery.prototype = {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The body element only exists once, optimize finding it
|
|
||||||
if ( selector === "body" && !context && document.body ) {
|
|
||||||
this.context = document;
|
|
||||||
this[0] = document.body;
|
|
||||||
this.selector = selector;
|
|
||||||
this.length = 1;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle HTML strings
|
// Handle HTML strings
|
||||||
if ( typeof selector === "string" ) {
|
if ( typeof selector === "string" ) {
|
||||||
// Are we dealing with HTML string or an ID?
|
// Are we dealing with HTML string or an ID?
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 912a8218c36f6136d694a0915eb92bdf3e7b5e41
|
Subproject commit feebbd7e053bff426444c7b348c776c99c7490ee
|
Loading…
Reference in New Issue
Block a user