Skip to content

JSPromise constructor (1 of 4)

Creates a new JS Promise with an async resolve callback.

C#
public JSPromise(AsyncResolveCallback callback)
parameterdescription
callbackCallback that is invoked immediately and must eventually invoke either the resolve function with a JSValue or throw an exception.

Remarks

Any (sync or async) exception thrown by the callback will be caught and used as a promise rejection error.

See Also


JSPromise constructor (2 of 4)

Creates a new JS Promise with an async resolve/reject callback.

C#
public JSPromise(AsyncResolveRejectCallback callback)
parameterdescription
callbackCallback that is invoked immediately and must eventually invoke either the resolve function with a JSValue, invoke the reject function with a JS Error, or throw an exception.

Remarks

Any (sync or async) exception thrown by the callback will be caught and used as a promise rejection error.

See Also


JSPromise constructor (3 of 4)

Creates a new JS Promise with a resolve callback.

C#
public JSPromise(ResolveCallback callback)
parameterdescription
callbackCallback that is invoked immediately and must eventually invoke either the resolve function with a JSValue or throw an exception.

Remarks

Any exception thrown by the callback will be caught and used as a promise rejection error.

See Also


JSPromise constructor (4 of 4)

Creates a new JS Promise with a resolve/reject callback.

C#
public JSPromise(ResolveRejectCallback callback)
parameterdescription
callbackCallback that is invoked immediately and must eventually invoke either the resolve function with a JSValue, invoke the reject function with a JS Error, or throw an exception.

Remarks

Any exception thrown by the callback will be caught and used as a promise rejection error.

See Also

Released under the MIT license