public class Promise
extends java.lang.Object
| Constructor and Description |
|---|
Promise() |
| Modifier and Type | Method and Description |
|---|---|
void |
jsConstructor(java.lang.Object executor)
Promise constructor - Creates a new Promise instance
|
void |
jsFunction_all(java.lang.Object[] promises)
Creates a Promise that resolves when all the provided Promises resolve,
or rejects immediately when any of the provided Promises reject.
|
void |
jsFunction_catch(java.lang.Object onRejected)
Attaches a callback for only the rejection of the Promise.
|
void |
jsFunction_race(java.lang.Object[] promises)
Creates a Promise that settles (resolves or rejects) as soon as any of the
provided Promises settle.
|
void |
jsFunction_Reject(java.lang.Object reason)
Creates a Promise that is rejected with the given reason.
|
void |
jsFunction_Resolve(java.lang.Object value)
Creates a Promise that is resolved with the given value.
|
void |
jsFunction_then(java.lang.Object onFulfilled,
java.lang.Object onRejected)
Attaches callbacks for the resolution and/or rejection of the Promise.
|
public void jsConstructor(java.lang.Object executor)
{function} - executor - A function that takes resolve and reject callbackspublic void jsFunction_then(java.lang.Object onFulfilled,
java.lang.Object onRejected)
{function|null} - [onFulfilled] - Callback to execute when the Promise is fulfilled.
If not a function or null, it will be ignored and
the fulfillment value will pass through unchanged.{function|null} - [onRejected] - Callback to execute when the Promise is rejected.
If not a function or null, it will be ignored and
the rejection reason will pass through unchanged.public void jsFunction_catch(java.lang.Object onRejected)
{function} - onRejected - Callback to execute when the Promise is rejected.
Receives the rejection reason as its argument.public void jsFunction_Resolve(java.lang.Object value)
{*} - value - The value to resolve the Promise withpublic void jsFunction_Reject(java.lang.Object reason)
{*} - reason - The reason for the rejection (typically an Error object)public void jsFunction_all(java.lang.Object[] promises)
{Array} - promises - An array of Promises or values to wait for{TypeError} - If the argument is not an arraypublic void jsFunction_race(java.lang.Object[] promises)
{Array} - promises - An array of Promises or values to race{TypeError} - If the argument is not an arrayCopyright © 2026 MediaBeacon, Inc. All Rights Reserved.