Promise.EventNotifier Class
Constructor
Promise.EventNotifier
()
Methods
addEvents
(
Promise
-
promise
Decorate a promise and register it and its kin as targets for notifications from this instance.
Returns the input promise.
Parameters:
-
promisePromiseThe Promise to add event support to
Returns:
decorate
(
static
-
promise
Decorate a Promise with an on method and make its then method propagate
event support to its generated child promises.
Parameters:
-
promisePromisethe Promise to add event support to
fire
(
Promise.EventNotifier
chainable
-
type -
[args*]
Notify registered Promises and their children of an event. Subscription callbacks will be passed additional args parameters.
Parameters:
-
typeStringThe name of the event to notify subscribers of
-
[args*]Any optionalArguments to pass to the callbacks
Returns:
Promise.EventNotifier:
this instance
