diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2012-10-20 21:02:01 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-10-20 21:02:21 -0400 |
commit | 8076a33bd86d15b80992602f4cd662ef741fd803 (patch) | |
tree | 5d7570ecc1a0ee35c18edaca82c5c634a6e88454 | |
parent | 2b0e720406c42a4065010ba94e7adb7170ba74c3 (diff) | |
download | jquery-8076a33bd86d15b80992602f4cd662ef741fd803.tar.gz jquery-8076a33bd86d15b80992602f4cd662ef741fd803.zip |
Don't expose jQuery.deletedIds. Close gh-889.
-rw-r--r-- | src/core.js | 3 | ||||
-rw-r--r-- | src/data.js | 2 | ||||
-rw-r--r-- | src/manipulation.js | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js index 907e40eb1..a9ad6bf6a 100644 --- a/src/core.js +++ b/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, diff --git a/src/data.js b/src/data.js index 1545968fe..6a30980e6 100644 --- a/src/data.js +++ b/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; } diff --git a/src/manipulation.js b/src/manipulation.js index ef305032e..43bb9a0a0 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -829,7 +829,7 @@ jQuery.extend({ elem[ internalKey ] = null; } - jQuery.deletedIds.push( id ); + core_deletedIds.push( id ); } } } |