You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
promise: The promise object, represented as a JsValueRef.
reason: The value/cause of the rejection, represented as a JsValueRef.
handled: Boolean - false for promiseRejected: i.e. if the promise has just been rejected with no handler, true for promiseHandled: i.e. if it was rejected before without a handler and is now being handled.
callbackState: The state passed to JsSetHostPromiseRejectionTracker.
Remarks
The host can specify a promise rejection tracker callback in JsSetHostPromiseRejectionTracker.
If a promise is rejected with no reactions or a reaction is added to a promise that was rejected
before it had reactions by default nothing is done.
A Promise Rejection Tracker callback may be set - which will then be called when this occurs.
Note - per ECMASpec #sec-host-promise-rejection-tracker this function should not set or return an exception.
Note also the promise and reason parameters may be garbage collected after this function is called if you wish to make further use of them you will need to use JsAddRef to preserve them.
However if you use JsAddRef you must also call JsRelease and not hold onto them after
a handled notification (both per spec and to avoid memory leaks).