@@ -215,7 +215,6 @@ emit anymore events.
215215| Event | Parameters | Notes
216216| +"success"+ | (depends) |
217217| +"error"+ | (depends) |
218- | +"cancel"+ | (depends) |
219218|=========================================================
220219
221220+promise.addCallback(listener)+ ::
@@ -224,9 +223,6 @@ Adds a listener for the +"success"+ event. Returns the same promise object.
224223+promise.addErrback(listener)+ ::
225224Adds a listener for the +"error"+ event. Returns the same promise object.
226225
227- +promise.addCancelback(listener)+ ::
228- Adds a listener for the +"cancel"+ event. Returns the same promise object.
229-
230226+promise.emitSuccess(arg1, arg2, ...)+ ::
231227If you created the promise (by doing +new node.Promise()+) then call
232228+emitSuccess+ to emit the +"success"+ event with the given arguments.
@@ -237,20 +233,10 @@ the moment due to a bug; use +emitSuccess+ instead.)
237233+promise.emitError(arg1, arg2, ...)+ ::
238234Emits the +"error"+ event.
239235
240- +promise.emitCancel(arg1, arg2, ...)+ ::
241- Emits the +"cancel"+ event. You may still get a +"success"+ or +"error"+
242- callback if the promise giver does not handle the cancel event. Use
243- +promise.cancel()+ to ignore any later events.
244-
245- +promise.cancel()+ ::
246- Clears all +"success"+ and +"error"+ event listeners from the promise, then
247- emits the +"cancel"+ event. Whether or not the promise is actually canceled
248- or not depends on the promise giver.
249-
250236+promise.timeout(timeout = undefined)+ ::
251237If the +timeout+ parameter is provided, the promise will emit an +"error"+
252238event after the given amount of millseconds. The timeout is canceled by any
253- +"success"+, +"error"+ or +"cancel "+ event being emitted by the Promise.
239+ +"success"+ or +"error "+ event being emitted by the Promise.
254240+
255241To tell apart a timeout from a regular "error" event, use the following test:
256242+
0 commit comments