onbeforeunload

var onbeforeunload: ((this: Window, ev: Event) => any) | null;