I am looking for an equivalent to mount in a LiveView module that is called when the client disconnects whether by losing internet connection or leaving the page. In response to this event I want to execute server-side code. From a lot of googling I could not find this functionality.
This is probably a bad comparison but where I have used equivalent functionality before is Vue where you have mounted and unmounted: Lifecycle Hooks | Vue.js.