function to determine whether or not events are emitted.
Methods
emit(type, data)
If filter condition is met, trigger an event, sending to all downstream handlers listening for provided 'type' key.
Parameters
type
String
event type key (for example, 'click')
data
Object
event data
Returns
EventHandler
this
trigger(type, data)
An alias of emit. Trigger determines whether to send events based on the return value of it's condition function when passed the event type and associated data.