Commit b964e569 authored by John Resig's avatar John Resig

Optimizing isXMLDoc.

parent 6fc57be8
...@@ -311,8 +311,7 @@ jQuery.extend({ ...@@ -311,8 +311,7 @@ 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.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML";
!!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML";
}, },
// Evalulates a script in a global context // 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