Class webdriver.promise.Deferred.<T>
code »webdriver.promise.Promise.<(T|null)>
└ webdriver.promise.Deferred
- All implemented interfaces:
webdriver.promise.Thenable.<(T|null)>
Represents a value that will be resolved at some point in the future. This
class represents the protected "producer" half of a Promise - each Deferred
has a promise
property that may be returned to consumers for
registering callbacks, reserving the ability to resolve the deferred to the
producer.
If this Deferred is rejected and there are no listeners registered before
the next turn of the event loop, the rejection will be passed to the
webdriver.promise.ControlFlow
as an unhandled failure.
If this Deferred is cancelled, the cancellation reason will be forward to the Deferred's canceller function (if provided). The canceller may return a truth-y value to override the reason provided for rejection.
Constructor
Parameters |
---|
|
Enumerations
|
Type Definitions
Instance Methods
Defined in webdriver.promise.Deferred
Defined in webdriver.promise.Promise.<(T|null)>
code »thenFinally ( callback )
Parameters |
---|
|
Instance Properties
Defined in webdriver.promise.Deferred
code »webdriver.promise.Deferred.prototype.promise : webdriver.promise.Promise.
Represents the eventual value of a completed operation. Each promise may be
in one of three states: pending, resolved, or rejected. Each promise starts
in the pending state and may make a single transition to either a
fulfilled or rejected state, at which point the promise is considered
resolved.
webdriver.promise.Promise.