DOM

settings_applicationsEventTarget  >   settings_applicationsNode  >   settings_applicationsElement  >   settings_applicationsHTMLElement  >   settings_applicationsHTMLBodyElement

DOM

Editing
  • bug_report

Eventunhandledrejection

insert_drive_filePromiseRejectionEventinterfaceopen_in_new
PromiseRejectionEvent interface는 HTMLBodyElement에서 unhandledrejection 이벤트 타입으로 구현된다.

HTMLBodyElement의 unhandledrejection는 PromiseRejectionEvent interface의 이벤트 타입이고 이벤트 리스너에서 사용된다.

기본 개요

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

설명

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

구문

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

명세

typeunhandledrejection
bubblesno
cancelableyes
targetWindow, Worker
handleryes

버전 명세

HTML Standard API
#event-unhandledrejection

지원 웹브라우저