mirror of
https://github.com/jquery/jquery.git
synced 2026-02-08 02:45:08 -05:00
Remove $("body") case; $(document.body) is 2x faster.
This commit is contained in:
committed by
Rick Waldron waldron.rick@gmail.com
parent
abd2a07498
commit
9ebc27db54
@@ -90,15 +90,6 @@ jQuery.fn = jQuery.prototype = {
|
||||
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
|
||||
if ( typeof selector === "string" ) {
|
||||
// Are we dealing with HTML string or an ID?
|
||||
|
||||
Submodule src/sizzle updated: 912a8218c3...feebbd7e05
Reference in New Issue
Block a user