+ 1

Back pressed event

exists "onBackPressed" or similar for javascript?

25th Apr 2017, 3:29 PM
Stefano Trinca
Stefano Trinca - avatar
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
25th Apr 2017, 4:46 PM
visph
visph - avatar