Skip to content
Permalink
Browse files

Changed the expando string to use a random number instead of the time…

…, so collisions become less likely. Also added jQuery version to instantly differentiate separate versions of jQuery (a common use case for noConflict, etc, when two jQuery instances are on the page). Fixes #6842.
  • Loading branch information...
SlexAxton authored and csnover committed Oct 11, 2010
1 parent 2866f16 commit faabb2c31883deabaddd5642eb5e708b5802f2b0
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/data.js
@@ -9,8 +9,9 @@ jQuery.extend({
// Please use with caution
uuid: 0,

// Unique for each copy of jQuery on the page
expando: "jQuery" + jQuery.now(),
// Unique for each copy of jQuery on the page
// Non-digits removed to match rinlinejQuery
expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),

// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.

0 comments on commit faabb2c

Please sign in to comment.
You can’t perform that action at this time.