6 respuestas
As per my knowledge, window.onbeforeunload will not work because in lightning everything loads in a seperate iframe.In Lightning - So basically in Lightning when your visualforce is loaded the window is already prepared behind the sceneIn Classic - Whevener you are going to your specific tab the page is loaded i.e (whole Classic is loaded) that's why you can handlet the window events.Hope you understood.To achieve your functionality you need to use jQuery plugin and you need to write some events like .ready or other depending on your requirement.Let me know if you find this useful.