git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fc57be
)
Optimizing isXMLDoc.
author
John Resig
<jeresig@gmail.com>
Wed, 22 Jul 2009 17:30:17 +0000
(17:30 +0000)
committer
John Resig
<jeresig@gmail.com>
Wed, 22 Jul 2009 17:30:17 +0000
(17:30 +0000)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
460a1da
..
b105c4c
100644
(file)
--- 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