aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-12-05 05:01:46 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-12-05 05:01:46 +0000
commit1be558203961c43043d6e9de3341e8bb9c3dcbf3 (patch)
tree9267ddb72365f30e25492bc899238bc4415a1069 /src
parent74a132d944886379456d562990c8fb217ab332e3 (diff)
downloadjquery-1be558203961c43043d6e9de3341e8bb9c3dcbf3.tar.gz
jquery-1be558203961c43043d6e9de3341e8bb9c3dcbf3.zip
Fixed #1419 where IE failed with .text() on an XML node. This is part of a series of tickets including #1264 where the context of the DOM manipulation was a problem in xml and iframe documents.
Diffstat (limited to 'src')
-rw-r--r--src/core.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js
index 0f274255f..23c1b79f3 100644
--- a/src/core.js
+++ b/src/core.js
@@ -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){