Fixed the logic for determining if an XML file is being used. Fixes jQuery bug #3896.

This commit is contained in:
John Resig 2009-01-19 18:56:02 +00:00
parent 1d513efd3c
commit d6e541426d

View file

@ -809,8 +809,8 @@ var contains = document.compareDocumentPosition ? function(a, b){
};
var isXML = function(elem){
return elem.documentElement && !elem.body ||
elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
return elem && elem.nodeType === 9 && elem.nodeName !== "HTML" ||
isXML( elem.ownerDocument );
};
var posProcess = function(selector, context){