new Messenger()
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.