-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Gets the result of a given promise object. | ||
|
||
### Syntax | ||
``` | ||
CHAKRA_API | ||
JsGetPromiseResult( | ||
_In_ JsValueRef *promise, | ||
_Out_ JsPromiseState *statusCode); | ||
``` | ||
|
||
### Parameters | ||
* __promise__: The Promise object. | ||
* __statusCode__: The result of the Promise. | ||
|
||
### Return Value | ||
The code **JsNoError** if the operation succeeded, a failure code otherwise. | ||
|
||
### Remarks | ||
**This API is experimental and may have breaking change later.** | ||
|
||
Requires an active script context. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Gets the state of a given `Promise` object. | ||
|
||
### Syntax | ||
``` | ||
CHAKRA_API | ||
JsGetPromiseState( | ||
_In_ JsValueRef *promise, | ||
_Out_ JsPromiseState *statusCode); | ||
``` | ||
|
||
### Parameters | ||
* __promise__: The `Promise` object. | ||
* __statusCode__: The current state of the `Promise` object. | ||
|
||
### Return Value | ||
The code **JsNoError** if the operation succeeded, a failure code otherwise. | ||
|
||
### Remarks | ||
**This API is experimental and may have breaking change later.** | ||
|
||
Requires an active script context. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
The possible states for a `Promise` object. | ||
|
||
### Syntax | ||
``` | ||
enum JsPromiseState | ||
``` | ||
|
||
### Members | ||
* __JsPromiseState_Pending__: The `Promise` has not yet been fulfilled or rejected. | ||
* __JsPromiseState_Fulfilled__: The `Promise` has been fulfilled. | ||
* __JsPromiseState_Rejected__: The `Promise` has been rejected. |