goog.Thenable |
Adds callbacks that will operate on the result of the Thenable, returning a
new child Promise.
If the Thenable is fulfilled, the
onFulfilled callback will be
invoked with the fulfillment value as argument, and the child Promise will
be fulfilled with the return value of the callback. If the callback throws
an exception, the child Promise will be rejected with the thrown value
instead.
If the Thenable is rejected, the onRejected callback will be invoked
with the rejection reason as argument, and the child Promise will be rejected
with the return value of the callback or thrown value.
Arguments:
Returns: !goog.Promise.<RESULT>
A new Promise that will receive the result
of the fulfillment or rejection callback.
|
code » |
![]()
Marks a given class (constructor) as an implementation of Thenable, so
that we can query that fact at runtime. The class must have already
implemented the interface.
Exports a 'then' method on the constructor prototype, so that the objects
also implement the extern interface for interop with
other Promise implementations.
Arguments:
|
code » | ||
No description.
Arguments:
Returns: boolean
Whether a given instance implements
goog.Thenable .
The class/superclass of the instance must call addImplementation .
|
code » |
![]()
An expando property to indicate that an object implements
goog.Thenable .
.
|
Code » |