HTML onrejectionhandled Event Attribute
HTML Event AttributeThis event attribute is supported by all modern browsers.
Description
The onrejectionhandled event attribute is used on the <body> element (or as window.onrejectionhandled) and runs a script when a rejected Promise that was reported as unhandled gets a handler later.
It always follows an onunhandledrejection event for the same promise. Error-tracking code can use it to remove the earlier report, since the rejection was dealt with after all. The event is a PromiseRejectionEvent with the properties promise and reason.
Syntax
<body onrejectionhandled="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML onrejectionhandled event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
This event attribute is supported by all modern browsers.
Desktop





Tablets & Mobile






-
Supported Unknown Not supported
Sponsors
Password Manager
PasswordPal stores your passwords and private notes behind encryption that happens in your browser.
Copy Paste List
Copy and paste or download lists in your preferred format, including plain text, PDF, or HTML.
Unicode Characters & Emojis
Search all Unicode characters and emojis plus other tools.
Check Shortened URLs
Expand shortened URLs to view the destination link.
Advertise Here
Advertise your company and products here!