Hi all, is there a way to call a function upon leaving a page or receiving a beforeUnload event? I would like to use the wixWindow . getBoundingRect () function to save the height of the page a user is on to local storage when they click a button to leave that page. Then upon returning to that page, I can use wixWindow.scrollTo() to bring them back to the same height they were at when the left the page initially. Thanks for any help in advance!
Not possible to work with beforeUnload in Velo. You can use setInterval() function to record the height.
good idea thank you