aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ajax.js3
-rw-r--r--src/ajax/jsonp.js2
-rw-r--r--src/ajax/var/nonce.js2
-rw-r--r--src/exports/global.js4
4 files changed, 6 insertions, 5 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 11eda0da0..639a6a380 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -610,7 +610,8 @@ jQuery.extend( {
// Add or update anti-cache param if needed
if ( s.cache === false ) {
cacheURL = cacheURL.replace( rantiCache, "$1" );
- uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
+ uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
+ uncached;
}
// Put hash and anti-cache on the URL that will be requested (gh-1732)
diff --git a/src/ajax/jsonp.js b/src/ajax/jsonp.js
index 28ae0365d..10186dea7 100644
--- a/src/ajax/jsonp.js
+++ b/src/ajax/jsonp.js
@@ -15,7 +15,7 @@ var oldCallbacks = [],
jQuery.ajaxSetup( {
jsonp: "callback",
jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
this[ callback ] = true;
return callback;
}
diff --git a/src/ajax/var/nonce.js b/src/ajax/var/nonce.js
index 33d0cffb6..c0e4472ac 100644
--- a/src/ajax/var/nonce.js
+++ b/src/ajax/var/nonce.js
@@ -1,5 +1,5 @@
define( function() {
"use strict";
- return Date.now();
+ return { guid: Date.now() };
} );
diff --git a/src/exports/global.js b/src/exports/global.js
index 460b56e47..2cc9577d7 100644
--- a/src/exports/global.js
+++ b/src/exports/global.js
@@ -1,6 +1,6 @@
define( [
"../core"
-], function( jQuery, noGlobal ) {
+], function( jQuery ) {
"use strict";
@@ -27,7 +27,7 @@ jQuery.noConflict = function( deep ) {
// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
-if ( !noGlobal ) {
+if ( typeof noGlobal === "undefined" ) {
window.jQuery = window.$ = jQuery;
}