JSObjectMakeDeferredPromise(_:_:_:_:)
Creates a JavaScript promise object by invoking the provided executor.
Declaration
func JSObjectMakeDeferredPromise(_ ctx: JSContextRef!, _ resolve: UnsafeMutablePointer<JSObjectRef?>!, _ reject: UnsafeMutablePointer<JSObjectRef?>!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> JSObjectRef!Parameters
- ctx:
The execution context to use.
- resolve:
A pointer to a Jsobjectref to store the resolve function in for the new promise. Pass
NULLif you don’t want to store the resolve callback. - reject:
A pointer to a Jsobjectref to store the reject function in for the new promise. Pass
NULLif you don’t want to store the reject callback. - exception:
A pointer to a Jsvalueref to store an exception in, if any. Pass
NULLto discard any exception.
Return Value
A JSObjectRef that’s a promise, or NULL if an exception occurs.
See Also
Working with Objects
JSObjectCallAsConstructor(_:_:_:_:_:)JSObjectCallAsFunction(_:_:_:_:_:_:)JSObjectCopyPropertyNames(_:_:)JSObjectDeleteProperty(_:_:_:_:)JSObjectGetPrivate(_:)JSObjectGetProperty(_:_:_:_:)JSObjectGetPropertyAtIndex(_:_:_:_:)JSObjectGetPrototype(_:_:)JSObjectHasProperty(_:_:_:)JSObjectIsConstructor(_:_:)JSObjectIsFunction(_:_:)JSObjectMake(_:_:_:)JSObjectMakeArray(_:_:_:_:)JSObjectMakeConstructor(_:_:_:)JSObjectMakeDate(_:_:_:_:)