pub unsafe extern "C" fn JSObjectMakeDeferredPromise(
ctx: JSContextRef,
resolve: *mut JSObjectRef,
reject: *mut JSObjectRef,
exception: *mut JSValueRef,
) -> JSObjectRef
Expand description
Creates a JavaScript promise object by invoking the provided executor.
ctx
: The execution context to use.resolve
: A pointer to aJSObjectRef
in which to store the resolve function for the new promise. PassNULL
if you do not care to store the resolve callback.reject
: A pointer to aJSObjectRef
in which to store the reject function for the new promise. PassNULL
if you do not care to store the reject callback.exception
: A pointer to aJSValueRef
in which to store an exception, if any. PassNULL
if you do not care to store an exception.
A JSObjectRef
that is a promise or NULL
if an exception occurred.