Fires an event notifying all subscribers.
{Object} Additional data object to be passed to all handlers.
{EventData}
Optional.
An EventData
object to be passed to all handlers.
For DOM events, an existing W3C/jQuery event object can be passed in.
{Object}
Optional.
The scope ("this") within which the handler will be executed.
If not specified, the scope will be set to the Event
instance.
Adds an event handler to be called when the event is fired.
Event handler will receive two arguments - an EventData
and the data
object the event was fired with.
{Function} Event handler.
Removes an event handler added with subscribe(fn)
.
{Function} Event handler to be removed.
A simple publisher-subscriber implementation. Event