I simply want to save current state of my PWA in IndexedDB before leaving the page (when the user navigates to a new page, reloads the same page, or closes the tab/browser).