Note: This feature is available in Web Workers.
The PromiseRejectionEvent
reason
read-only property is any JavaScript value or Object
which provides the reason passed into Promise.reject()
. This in theory provides information about why the promise was rejected.
A value or object which provides information you can use to understand why the promise was rejected. This could be anything from an error code to an object with text, links, and whatever else you might wish to include.
Exampleswindow.onunhandledrejection = (e) => {
console.log(e.reason);
};
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3