Hi, Debajit, 
I have a question here, what if I need to wait for the async function to be completed when "onbeforeunload"?
In my case, the form will close whatever method I tried to keep the async function to be sync.
Thanks,
Kai.