Commit d6e54142 authored by John Resig's avatar John Resig

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

parent 1d513efd
......@@ -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){
......
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