Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

PromiseRejectionEvent()

The PromiseRejectionEvent() constructor returns a newly created PromiseRejectionEvent, which represents events fired when a JavaScript Promise is rejected.

Syntax

new PromiseRejectionEvent(type, {
  promise: somePromise, 
  reason : someValue
});

Parameters

The PromiseRejectionEvent() constructor also inherits arguments from Event().

type
A string representing the name of the type of the PromiseRejectionEvent. This is case-sensitive and must be one of "rejectionhandled" or "unhandledrejection".
promise
The Promise which was rejected.
reason
Any value or Object which represents the reason the promise was rejected.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'PromiseRejectionEvent()' in that specification.
Living Standard Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 49 No support No support No support No support
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support No support No support No support No support

See also

Document Tags and Contributors

 Contributors to this page: fscholz, Sheppy
 Last updated by: fscholz,