Skip to content
Permalink
Browse files

Optimizing isXMLDoc.

  • Loading branch information
jeresig committed Jul 22, 2009
1 parent 6fc57be commit b964e56946c9111d7e53fa1eafb14cab3cd642f2
Showing with 1 addition and 2 deletions.
  1. +1 −2 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

0 comments on commit b964e56

Please sign in to comment.
You can’t perform that action at this time.