Fixed #1419 where IE failed with .text() on an XML node. This is part of a series...
[jquery.git] / src / core.js
index 0f27425..23c1b79 100644 (file)
@@ -917,7 +917,8 @@ jQuery.extend({
        clean: function( elems, context ) {
                var ret = [];
                context = context || document;
-               if (!context.createElement) 
+               // !context.createElement fails in IE with an error but returns typeof 'object'
+               if (typeof context.createElement == 'undefined') 
                        context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
 
                jQuery.each(elems, function(i, elem){