pub unsafe extern "C-unwind" fn JSObjectMakeDeferredPromise(
ctx: JSContextRef,
resolve: *mut JSObjectRef,
reject: *mut JSObjectRef,
exception: *mut JSValueRef,
) -> JSObjectRef
Available on crate features
JSBase
and JSObjectRef
only.Expand description
Creates a JavaScript promise object by invoking the provided executor.
Parameter ctx
: The execution context to use.
Parameter resolve
: 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.
Parameter reject
: 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.
Parameter exception
: A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
Returns: A JSObject that is a promise or NULL if an exception occurred.
ยงSafety
ctx
must be a valid pointer.resolve
must be a valid pointer.reject
must be a valid pointer.exception
must be a valid pointer.