I want to call onpageshow event on my web page. It working fine when I a page show in browser and also when I come back to a page using browser back button. But when I run the same thing is not calling for my windows phone browser in case of page show using browser back button. By typing page url in address bar and hit enter is working fine.
Below is my code snippet.
var myEvent = window.attachEvent || window.addEventListener;
var chkevent = window.attachEvent ? 'pageshow' : 'pageshow';
myEvent(chkevent, function (e) {
alert('leave');
});
Please suggest. Thanks in advance.