Shortened the isXMLDoc code, based upon recommendation from Andrea.

This commit is contained in:
John Resig 2009-07-27 13:21:19 +00:00
parent 2cd9ee3510
commit 255a293cda

View File

@ -315,8 +315,7 @@ jQuery.extend({
isXMLDoc: function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = (elem.ownerDocument || elem).documentElement;
return !!documentElement && documentElement.nodeName !== "HTML";
return ((elem.ownerDocument || elem).documentElement || 0).nodeName !== "HTML";
},
// Evalulates a script in a global context