stop
End an event batch.
canBatch.stop([force[, callStart]])
If this call to stop
matches the number of calls to start
, all of this batch's [can-event/batch/batch.trigger triggered]
events will be dispatched. If the firing of those events creates new events, those new events will be dispatched
after the current batch in their own batch.
Parameters
- force
{bool}
:Whether to stop batching events immediately.
- callStart
{bool}
:Whether to call start after firing batched events.
canBatch.stop
matches an earlier start
call. If canBatch.stop
has been
called as many times as canBatch.start
(or if force is true), all batched events will be
fired and any callbacks passed to canBatch.start
since the beginning of the batch will be
called. If force and callStart are both true, a new batch will be started when all
the events and callbacks have been fired.
See start
for examples of canBatch.start
and canBatch.stop
in normal use.