DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
  • Infrastructure
    • can-construct
    • can-control
    • can-event
    • can-event/async/async
    • can-event/batch/batch
      • afterPreviousEvents
      • collecting
      • dispatch
      • dispatching
      • queue
      • start
      • stop
    • can-observation
    • can-simple-map
    • can-util
    • can-view-callbacks
    • can-view-live
    • can-view-model
    • can-view-nodelist
    • can-view-parser
    • can-view-scope
    • can-view-target
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Infrastructure
  • /
  • can-event/batch/batch
  • /
  • stop
  • / On this page
    • stop

      function

      End an event batch.

      • source

      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

      1. force {bool}:

        Whether to stop batching events immediately.

      2. 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.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.