Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Brought the logic for handling isXMLDoc over from Sizzle.

  • Loading branch information...
commit 04977b8ea2f9cbf786ae244a8b47aed67e37df7f 1 parent 6799982
John Resig jeresig authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core.js
4 src/core.js
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.