mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Allows traditional options object for $.Callbacks flags. Fixes #11011. Unit tests added.
This commit is contained in:
@@ -38,9 +38,9 @@ function createFlags( flags ) {
|
||||
*/
|
||||
jQuery.Callbacks = function( flags ) {
|
||||
|
||||
// Convert flags from String-formatted to Object-formatted
|
||||
// Convert flags from String-formatted to Object-formatted if needed
|
||||
// (we check in cache first)
|
||||
flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
|
||||
flags = typeof flags === "string" ? ( flagsCache[ flags ] || createFlags( flags ) ) : ( flags || {} );
|
||||
|
||||
var // Actual callback list
|
||||
list = [],
|
||||
|
||||
Reference in New Issue
Block a user