Dispatchs an event within the event batching system.
canBatch.trigger(item, event [, args])
Makes sure an event is fired at the appropriate time within the appropriate batch. How and when the event fires depends on the batching state.
There are three states of batching:
- no queues -
triggeris called outside of any
stopcall -> The event is dispatched immediately.
- collecting batch -
triggeris called between a
stopcall -> The event is dispatched when
- firing queues -
triggeris called due to another
triggercalled within a batch -> The event is dispatched after the current batch has completed in a new batch.
Finally, if the event has a
batchNum it is fired immediately.
the target of the event.
the type of event, or an event object with a type given like
the parameters to trigger the event with.