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
startBatchafter firing batched events
stopBatchmatches an earlierstartBatchcall. IfstopBatchhas been called as many times asstartBatch(or if force is true), all batched events will be fired and any callbacks passed tostartBatchsince 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
startBatchfor examples ofstartBatchandstopBatchin normal use.In this example, the batch is forceably ended in the
addPeoplefunction.