aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2012-12-20 02:27:45 +0400
committerOleg <markelog@gmail.com>2012-12-24 03:04:08 +0400
commitd552b94463010b6abeeed5227f67c00c06ff31ff (patch)
tree3fbc3bcf1a5a8deab19150f48cdec38c7262ec6c /src/manipulation.js
parentc334878871b2fa71a445054d9442a3fd12b742d7 (diff)
downloadjquery-d552b94463010b6abeeed5227f67c00c06ff31ff.tar.gz
jquery-d552b94463010b6abeeed5227f67c00c06ff31ff.zip
Simplify jQuery.expando
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 513c4cfd2..134b3a800 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -502,7 +502,6 @@ jQuery.extend({
i = 0,
internalKey = jQuery.expando,
cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
special = jQuery.event.special;
for ( ; (elem = elems[ i ]) != null; i++ ) {
@@ -513,37 +512,20 @@ jQuery.extend({
data = id && cache[ id ];
if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
}
}
// Remove cache only if it was not already removed by jQuery.event.remove
if ( cache[ id ] ) {
-
delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- core_deletedIds.push( id );
+ delete elem[ internalKey ];
}
}
}