window.onbeforeunload event