WindowEventHandlers.onrejectionhandled
The onrejectionhandled
property of the
WindowEventHandlers
mixin is the EventHandler
for
processing rejectionhandled
events. These events are raised when
Promise
s are rejected.
Syntax
window.addEventListener("rejectionhandled", function(event) { ... });
window.onrejectionhandled = function(event) { ...};
Example
window.onrejectionhandled = function(e) {
console.log(e.reason);
}
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'onrejectionhandled' in that specification. |
Living Standard | Initial definition. |
Browser compatibility
BCD tables only load in the browser