Use the isXML function from Sizzle.
authorJohn Resig <jeresig@gmail.com>
Mon, 7 Dec 2009 01:52:31 +0000 (17:52 -0800)
committerJohn Resig <jeresig@gmail.com>
Mon, 7 Dec 2009 01:52:31 +0000 (17:52 -0800)
src/core.js
src/sizzle-jquery.js

index 5cb0220..b738ce4 100644 (file)
@@ -342,14 +342,6 @@ jQuery.extend({
                return true;
        },
 
-       // check if an element is in a (or is an) XML document
-       isXMLDoc: function( elem ) {
-               // documentElement is verified for cases where it doesn't yet exist
-               // (such as loading iframes in IE - #4833)
-               var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
-               return documentElement ? documentElement.nodeName !== "HTML" : false;
-       },
-
        // Evalulates a script in a global context
        globalEval: function( data ) {
                if ( data && rnotwhite.test(data) ) {
index 3d15128..cb4c8e1 100644 (file)
@@ -3,5 +3,6 @@ jQuery.expr = Sizzle.selectors;
 jQuery.expr[":"] = jQuery.expr.filters;
 jQuery.unique = Sizzle.uniqueSort;
 jQuery.getText = getText;
+jQuery.isXMLDoc = isXML;
 
 return;