BeforeUnloadEvent
The BeforeUnloadEvent
interface represents the event object for the Window/beforeunload_event event, which is fired when the current window, contained document, and associated resources are about to be unloaded.