DOM

settings_applicationsEventTarget  >   settings_applicationsWindow  >   settings_applicationswindow

DOM

Editing
  • bug_report

EventHandleronunhandledrejection

insert_drive_fileWindowEventHandlersmixinopen_in_new
WindowEventHandlers의 onunhandledrejection은 window.onunhandledrejection의 의해 사용된다.

Window의 'onunhandledrejection'는(은) Mixin 타입의 WindowEventHandlers의 Event-handler이다.

기본 개요

프로미스(promise)가 거부될 때 명시된 핸들러가 없는 경우 전역(Window, Worker) 컨텍스트(context)로 전송한다.

설명

디버깅 및 예상치 못한 상황에 대한 대체 오류 처리를 제공할 경우 유용하다.

구문

형식
window.onunhandledrejection = function() { };
형식
window.addEventListener("unhandledrejection", function() {});

명세

typeunhandledrejection
bubblesno
cancelableyes
targetWindow, Worker
handleryes

버전 명세

HTML Standard API
#event-unhandledrejection

지원 웹브라우저