class Callback_<T, R>

webdriver.promise.Deferred<R>
  └ webdriver.promise.Callback_
All implemented interfaces:
webdriver.promise.Thenable<T>

Manages a callback attached to a webdriver.promise.Promise. When the promise is resolved, this callback will invoke the appropriate callback function based on the promise's resolved value.

new Callback_(parent, callback, errback, name, fn)

Parameters
parentwebdriver.promise.Promise

The promise this callback is attached to.

callback?(function(T): (IThenable<R>|R))

The fulfillment callback.

errback?(function(*): (IThenable<R>|R))

The rejection callback.

namestring

The callback name.

fnFunction

The function to use as the top of the stack when recording the callback's creation point.

Instance Methods

notify(state, value)code ยป

Called by the parent promise when it has been resolved.

Parameters
statestring

The parent's new state.

value*

The parent's new value.