MDN’s new design is in Beta! A sneak peek:


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


new PromiseRejectionEvent(type, {
  promise: somePromise, 
  reason : someValue


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

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


var myRejectionEvent = new PromiseRejectionEvent('unhandledrejection', {
  promise : myPromise,
  reason : 'My house is on fire'


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[1] No support No support No support
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support No support[1] No support No support No support

[1] In Firefox, this is implemented but disabled by default. To turn it on, go to about:config and set the dom.promise_rejection_events.enabled pref to true.

See also

Document Tags and Contributors

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