The browser tab is closed and then restored using Ctrl+Shift+T.
I need to execute some logic at the moment when tab is closing or is restored.
But I shouldn't handle navigation to other page, so events like beforeunload
are not ok.
It's guaranteed that application is not open in more than one tab.
How can I implement this?