Skip to main content

Hi All,

 

I have a custom lightning component being hosted in a community page.

I was wondering if it would be possible to catch the browser windows close event (beforeUnload) in a lightning component?

This would be useful to both warn the end user and do some data clean up before closing the window.

 

My question is similar to the question being discussed on this topic: https://salesforce.stackexchange.com/questions/244204/does-beforeunload-event-work-in-lightning

 

Thank you for your assistance.

Tiago

3 comments
0/9000