Javascript detect browser close event and trigger message Body of the page goes here.

You must type something in the textarea below or simply click somewhere in the page to activate the listener. Simply opening this page and closing it may not trigger a confirmation pop up