Skip to content

Commit

Permalink
Brought the logic for handling isXMLDoc over from Sizzle.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Jan 19, 2009
1 parent 6799982 commit 04977b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.js
Expand Up @@ -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
Expand Down

0 comments on commit 04977b8

Please sign in to comment.