I want to call an API when the user closes or reloads the webpage(web application).
listen event
html.window.onBeforeUnload.listen( (eve