DOM

settings_applicationsEventTarget  >   settings_applicationsNode  >   settings_applicationsElement  >   settings_applicationsHTMLElement  >   settings_applicationsHTMLBodyElement

DOM

Editing
  • bug_report

Eventbeforeunload

insert_drive_fileEventinterfaceopen_in_new
Event interface는 HTMLBodyElement에서 beforeunload 이벤트 타입으로 구현된다.

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

기본 개요

window, document, resources가 unload되려고 할 때 발생한다.

구문

형식
window.onbeforeunload = function() { }
형식
window.addEventListener("beforeunload", function() { });

명세

typebeforeunload
bubblesno
cancelableno
targetwindow
handleryes

버전 명세

HTML Standard API
#event-beforeunload

지원 웹브라우저