« XUL Reference home
onunload
Type: script code

Specifies a set of scripts to execute when the browser window is closed by the user. This code is used by some programmers to annoyingly pop up alert boxes preventing the users from leaving the page.

Closing the window calls this eventhandler on the prefwindow.