Skip to content

JsGetPromiseResult

Kyle Farnung edited this page May 10, 2018 · 1 revision

Gets the result of a given Promise object.

Syntax

CHAKRA_API
    JsGetPromiseResult(
        _In_ JsValueRef *promise,
        _Out_ JsValueRef *result);

Parameters

  • promise: The Promise object.
  • result: The result of the Promise. This contains the value passed to either the resolve or reject handler. Use JsGetPromiseState to determine whether the Promise was fulfilled or rejected.

Return Value

The code JsNoError if the operation succeeded, a failure code otherwise. If the promise is still pending then JsErrorPromisePending will be returned.

Remarks

This API is experimental and may have breaking change later.

Requires an active script context.

Clone this wiki locally