Skip to content

Commit

Permalink
Optimizing isXMLDoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Jul 22, 2009
1 parent 6fc57be commit b964e56
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core.js
Expand Up @@ -311,8 +311,7 @@ jQuery.extend({


// check if an element is in a (or is an) XML document // check if an element is in a (or is an) XML document
isXMLDoc: function( elem ) { isXMLDoc: function( elem ) {
return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML";
!!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML";
}, },


// Evalulates a script in a global context // Evalulates a script in a global context
Expand Down

0 comments on commit b964e56

Please sign in to comment.