I am just wondering if it is possible to detect if the window is asked to being closed by clicking on the "X" button on the browser? So before the window is actually close, i would like to do something first. Is it possible?