aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-02-13 06:32:20 -0500
committerjeresig <jeresig@gmail.com>2010-02-13 06:32:20 -0500
commit9195107dbb13ad34ae4e9f7cb1df5d79e4748560 (patch)
tree30c8b42fe799b8df75e9b562ad24d0a035ed410b /src/manipulation.js
parentda966573c3f3cb083c48cd3ead88e7542937d4df (diff)
downloadjquery-9195107dbb13ad34ae4e9f7cb1df5d79e4748560.tar.gz
jquery-9195107dbb13ad34ae4e9f7cb1df5d79e4748560.zip
Clean up expando removal code - only try to delete the expando from an element if it's possible.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 4e7a31ed4..4eb19eaf0 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -547,7 +547,9 @@ jQuery.extend({
},
cleanData: function( elems ) {
- var data, id, cache = jQuery.cache, special = jQuery.event.special;
+ var data, id, cache = jQuery.cache,
+ special = jQuery.event.special,
+ deleteExpando = jQuery.support.deleteExpando;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
id = elem[ jQuery.expando ];
@@ -566,7 +568,9 @@ jQuery.extend({
}
}
- removeExpando( elem );
+ if ( deleteExpando ) {
+ delete elem[ expando ];
+ }
delete cache[ id ];
}