Simplified the isXML function, no need to use recursion.
This commit is contained in:
parent
1c5db3baba
commit
4bbb70b4eb
|
@ -291,9 +291,12 @@ jQuery.fn = jQuery.prototype = {
|
||||||
jQuery.find( selector, this[0], ret );
|
jQuery.find( selector, this[0], ret );
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
|
var ret = this.pushStack( "", "find", selector );
|
||||||
return jQuery.find( selector, elem );
|
for ( var i = 0, l = this.length; i < l; i++ ) {
|
||||||
})), "find", selector );
|
jQuery.find( selector, this[i], ret );
|
||||||
|
}
|
||||||
|
//jQuery.find.uniqueSort( ret );
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -941,7 +941,7 @@ var contains = document.compareDocumentPosition ? function(a, b){
|
||||||
|
|
||||||
var isXML = function(elem){
|
var isXML = function(elem){
|
||||||
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
|
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
|
||||||
!!elem.ownerDocument && isXML( elem.ownerDocument );
|
!!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML";
|
||||||
};
|
};
|
||||||
|
|
||||||
var posProcess = function(selector, context){
|
var posProcess = function(selector, context){
|
||||||
|
|
Loading…
Reference in a new issue