Class: Messenger

Messenger

Messenger is a system that allows subscribing to named Signals.


new Messenger()

Author:
  • derschmale <http://www.derschmale.com>

Methods


bind()

Binds a function to the message with the given name. The callback's first argument will be the name string of the message.


broadcast()

Dispatches the message with the given name.


hasListeners()

Returns whether or not anyone is listening to the given message.


unbind()

Removes a bound callback function.