Set up a callback to be fired on Window's beforeunload event.
beforeunload
The callback to be called when the beforeunload event is fired.
Optional
Options
If true, the event will be captured during the capture phase. Defaults to false.
true
false
Set up a callback to be fired on Window's
beforeunloadevent.