Commit 04977b8e authored by John Resig's avatar John Resig

Brought the logic for handling isXMLDoc over from Sizzle.

parent 67999828
......@@ -621,8 +621,8 @@ jQuery.extend({
// check if an element is in a (or is an) XML document
isXMLDoc: function( elem ) {
return elem.documentElement && !elem.body ||
elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
},
// Evalulates a script in a global context
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment