Is there any way in javascript to deactivate a button is the current page is refreshing / reloading? I want to deactivate some buttons when the user presses F5 / Refresh the page and I don't know if there is any way to verify is this event is ongoing. I want to add this validation when the user clicks the button:
<button onclick="if(IS_REFRESH_ONGOING) return false;">Button</button>