Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't expose jQuery.deletedIds. Close gh-889.

  • Loading branch information...
commit 8076a33bd86d15b80992602f4cd662ef741fd803 1 parent 2b0e720
@rwaldron rwaldron authored dmethvin committed
Showing with 5 additions and 2 deletions.
  1. +3 −0  src/core.js
  2. +1 −1  src/data.js
  3. +1 −1  src/manipulation.js
View
3  src/core.js
@@ -36,6 +36,9 @@ var
// Used for detecting and trimming whitespace
core_rnotwhite = /\S/,
core_rspace = /\s+/,
+
+ // List of deleted data cache ids, so we can reuse them
+ core_deletedIds = [],
// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
View
2  src/data.js
@@ -32,7 +32,7 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
- elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+ elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
} else {
id = internalKey;
}
View
2  src/manipulation.js
@@ -829,7 +829,7 @@ jQuery.extend({
elem[ internalKey ] = null;
}
- jQuery.deletedIds.push( id );
+ core_deletedIds.push( id );
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.