]> source.dussan.org Git - jquery.git/commitdiff
Remove $("body") case; $(document.body) is 2x faster.
authorDave Methvin <dave.methvin@gmail.com>
Wed, 18 Apr 2012 17:04:04 +0000 (13:04 -0400)
committerRick Waldron waldron.rick@gmail.com <waldron.rick@gmail.com>
Wed, 18 Apr 2012 17:04:44 +0000 (13:04 -0400)
src/core.js
src/sizzle

index 4e38deaebe79a8238008f5044e36569cdc4d4a21..f317666ce73f4363df0d28eab364ffc9bd2459f1 100644 (file)
@@ -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?
index 912a8218c36f6136d694a0915eb92bdf3e7b5e41..feebbd7e053bff426444c7b348c776c99c7490ee 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 912a8218c36f6136d694a0915eb92bdf3e7b5e41
+Subproject commit feebbd7e053bff426444c7b348c776c99c7490ee