javascript - Detect browser or tab closing -


is there cross-browser javascript/jquery code detect if browser or browser tab being closed, not due link being clicked?

if correctly, want know when tab/window closed. well, afaik way in javascript detect kind of stuffs onunload & onbeforeunload events.

unfortunately (or fortunately?), events fired when leave site on link or browsers button. best answer can give, don't think can natively detect pure close in javascript. correct me if i'm wrong here.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -