Wednesday, 15 August 2012

javascript - binding popstate event not working -



javascript - binding popstate event not working -

i have tried type code browser's console:

window.onpopstate = function() {alert(1);}

and click button. no alert has shown. doing wrong? or not allowed bind popstate event page console?

using chrome 24 , firefox 18

type console

window.onpopstate = function() {alert(1);}; history.pushstate({}, '');

then click button.

javascript google-chrome firefox browser-history popstate

No comments:

Post a Comment