I try to listen if the user is pressing one of the buttons: Back, Start or Search (<- not available anymore) , on a Windows Phone, and simply output an alert if this is the case
e.g. alert("user pressed start");
Is this possible?
I'm trying to find out if the user is about to close the browser and execute a function before he does. On desktop browsers this is easily done with onbeforeunload
, but this does not seem to work on mobile browsers.