Brought the logic for handling isXMLDoc over from Sizzle.
This commit is contained in:
parent
6799982835
commit
04977b8ea2
|
@ -621,8 +621,8 @@ jQuery.extend({
|
||||||
|
|
||||||
// check if an element is in a (or is an) XML document
|
// check if an element is in a (or is an) XML document
|
||||||
isXMLDoc: function( elem ) {
|
isXMLDoc: function( elem ) {
|
||||||
return elem.documentElement && !elem.body ||
|
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
|
||||||
elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
|
!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
|
||||||
},
|
},
|
||||||
|
|
||||||
// Evalulates a script in a global context
|
// Evalulates a script in a global context
|
||||||
|
|
Loading…
Reference in a new issue