-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Description
Note how .lock() aborts active execution unless the "memory" flag is set. This is arguably by design, but it seems to me that the purpose of the method is preventing effects of future fire calls—execution interruption being more properly provided by the "stopOnFalse" flag.
This has probably gone unnoticed for lack of use (all of our internal callbacks have memory), but nonetheless would be a breaking fix and called for with a major version bump.
In code, this assertion fails:
var completed,
list = jQuery.Callbacks();
list.add( list.lock );
list.add(function() { completed = true; });
list.fire();
equal( completed, true );