stop
End an event batch.
can.batch.stop([force[, callStart]])
Parameters
-
force
=false
{bool}
Optionalwhether to stop batching events immediately
-
callStart
=false
{bool}
Optionalwhether to call
can.batch.start
after firing batched events
can.batch.stop
matches an earliercan.batch.start
call. Ifcan.batch.stop
has been called as many times ascan.batch.start
(or if force is true), all batched events will be fired and any callbacks passed tocan.batch.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
can.batch.start
for examples ofcan.batch.start
andcan.batch.stop
in normal use.In this example, the batch is forceably ended in the
addPeople
function.