forked from jquery/jquery
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core:Ajax: Align nonce & global with master, fix an AMD issue
This commit aligns the `3.x-stable` branch with `master` in two aspects: 1. It migrates the nonce module to return an object instead of a primitive variable. This had to be changed on `master` as in ES modules you export live read-only bindings to variables, meaning you can't increment the nonce directly. Also, the way it was done so far was working differently in AMD & the single built file - in the built file one nonce variable was declared, accessed and incremented. In AMD mode separate instances were create for each module that depend on the nonce module, creating unintended nonce clashes. 2. Whether the `noGlobal` parameter was set to `true` is now checked using the typeof operator to align with `master`. Ref jquerygh-4541 Ref d0ce00c
- Loading branch information
Showing
4 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
define( function() { | ||
"use strict"; | ||
|
||
return Date.now(); | ||
return { guid: Date.now() }; | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters