Hi Alexandre,
In general, you wouldn't want to do anything in the OnDestroy except for releasing of resource you may have created or claimed in JavaScript. Note that the OnDestroy is only called when the page is navigated away from, not when the browser window is closed.
The preferred way is to either have a button on the screen the user can click, or handle things in the OnReady, or in the OnAfterFetch of a screen aggregate if you also first need to retrieve data.