Generic event dispatcher
off
type
[callback]
Remove an event listener
Return instance of current object
on
type
callback
[priority=0]
Add an event listener to the listen to an event from either the parent or iframe
type
String | Object
The type of event to listen for or a map of events to callbacks. Multiple events can be added by separating events with spaces.
callback
Function
The handler when an event is triggered
[priority=0]
Int
optional
The priority of the event listener. Higher numbers are handled first.
Return instance of current object
trigger
event
Trigger any event handlers for an event type
event
Object
The event to send