mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #13076. Speed up $() with strings, part of gh-1089.
This commit is contained in:
parent
4de4be42f6
commit
d829804631
@ -156,4 +156,4 @@ Matthias Jäggli <matthias.jaeggli@gmail.com>
|
||||
Yiming He <yiminghe@gmail.com>
|
||||
Devin Cooper <cooper.semantics@gmail.com>
|
||||
Bennett Sorbo <bsorbo@gmail.com>
|
||||
|
||||
Sebastian Burkhard <sebi.burkhard@gmail.com>
|
||||
|
@ -96,8 +96,8 @@ jQuery.fn = jQuery.prototype = {
|
||||
return this;
|
||||
}
|
||||
|
||||
// HANDLE: $(DOMElement)
|
||||
if ( selector.nodeType ) {
|
||||
// HANDLE: $(DOMElement); check first that selector is not a primitive
|
||||
if ( typeof selector === "object" && selector.nodeType ) {
|
||||
this.context = this[0] = selector;
|
||||
this.length = 1;
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user