public class JSPromise extends JSObject
JSObject.jsexport, JSObject.Property<T>
JSPropertyAttributeDontDelete, JSPropertyAttributeDontEnum, JSPropertyAttributeNone, JSPropertyAttributeReadOnly
Constructor and Description |
---|
JSPromise(JSContext ctx)
Creates a new JavaScript Promise object.
|
Modifier and Type | Method and Description |
---|---|
void |
reject(java.lang.Object... args)
Rejects the Promise
|
void |
resolve(java.lang.Object... args)
Resolves the Promise
|
__nullFunc, deleteProperty, getThis, hashCode, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames, prototype, prototype
equals, getContext, isArray, isBoolean, isDate, isEqual, isFloat32Array, isFloat64Array, isInstanceOfConstructor, isInt16Array, isInt32Array, isInt8Array, isNull, isNumber, isObject, isStrictEqual, isString, isTypedArray, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toNumber, toObject, toString, valueHash
public JSPromise(JSContext ctx)
ctx
- The JavaScript contextpublic void resolve(java.lang.Object... args)
args
- optional arguments to pass to promise resolution functionpublic void reject(java.lang.Object... args)
args
- optional arguments to pass to the promise rejection function