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