Permalink
Browse files

Brought the logic for handling isXMLDoc over from Sizzle.

  • Loading branch information...
1 parent 6799982 commit 04977b8ea2f9cbf786ae244a8b47aed67e37df7f @jeresig jeresig committed Jan 19, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core.js
View
4 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

0 comments on commit 04977b8

Please sign in to comment.