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:
6799982
)
Brought the logic for handling isXMLDoc over from Sizzle.
author
John Resig
<jeresig@gmail.com>
Mon, 19 Jan 2009 23:17:30 +0000
(23:17 +0000)
committer
John Resig
<jeresig@gmail.com>
Mon, 19 Jan 2009 23:17:30 +0000
(23:17 +0000)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
6dc4f00
..
13efaec
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-621,8
+621,8
@@
jQuery.extend({
// check if an element is in a (or is an) XML document
isXMLDoc: function( elem ) {
- return elem.documentElement && !elem.body ||
- elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
+ return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
+ !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
},
// Evalulates a script in a global context