diff options
author | John Resig <jeresig@gmail.com> | 2009-07-22 17:30:17 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-07-22 17:30:17 +0000 |
commit | b964e56946c9111d7e53fa1eafb14cab3cd642f2 (patch) | |
tree | 8b24c4a4d0bd8377c17fa2e59ba5a37198cae548 /src/core.js | |
parent | 6fc57be843e2120ee6361af45b38d12a8c876f40 (diff) | |
download | jquery-b964e56946c9111d7e53fa1eafb14cab3cd642f2.tar.gz jquery-b964e56946c9111d7e53fa1eafb14cab3cd642f2.zip |
Optimizing isXMLDoc.
Diffstat (limited to 'src/core.js')
-rw-r--r-- | src/core.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js index 460a1dad2..b105c4c5b 100644 --- a/src/core.js +++ b/src/core.js @@ -311,8 +311,7 @@ jQuery.extend({ // check if an element is in a (or is an) XML document isXMLDoc: function( elem ) { - return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || - !!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML"; + return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML"; }, // Evalulates a script in a global context |