WindowEventHandlers.onrejectionhandled

The onrejectionhandled property of the WindowEventHandlers mixin is the event handler for processing rejectionhandled events. These events are raised when Promises are rejected.

Syntax

window.addEventListener("rejectionhandled", function(event) { ... });
window.onrejectionhandled = function(event) { ...};

Example

window.onrejectionhandled = function(e) {
  console.log(e.reason);
}

Specifications

Specification
HTML Standard (HTML)
# handler-window-onrejectionhandled

Browser compatibility

BCD tables only load in the browser