+ 1
Back pressed event
exists "onBackPressed" or similar for javascript?
1 ответ
+ 5
If by 'back pressed event' you mean event listener for the previous page button of the browser, there isn't... but you have an event listener attachable to the 'window' object 'onbeforeunload':
https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload