JSObjectMakeDeferredPromise top-level property
JSObjectRef Function(JSContextRef ctx, Pointer<JSObjectRef> resolve, Pointer<JSObjectRef> reject, Pointer<JSValueRef> exception)
JSObjectMakeDeferredPromise
final
Creates a JavaScript promise object by invoking the provided executor.
ctx
(JSContextRef) The execution context to use.
resolve
(JSObjectRef*) A pointer to a JSObjectRef in which to store the resolve function for the new promise. Pass NULL if you do not care to store the resolve callback.
reject
(JSObjectRef*) A pointer to a JSObjectRef in which to store the reject function for the new promise. Pass NULL if you do not care to store the reject callback.
exception
(JSValueRef*) A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result
(JSObjectRef) A JSObject that is a promise or NULL if an exception occurred.
Implementation
final JSObjectRef Function(
JSContextRef ctx,
Pointer<JSObjectRef> resolve,
Pointer<JSObjectRef> reject,
Pointer<JSValueRef> exception,
)
JSObjectMakeDeferredPromise =
kLookup<
NativeFunction<
JSObjectRef Function(
JSContextRef,
Pointer<JSObjectRef>,
Pointer<JSObjectRef>,
Pointer<JSValueRef>,
)
>
>('JSObjectMakeDeferredPromise').asFunction();