javascript - How to figure out if the window is closing in the callback of jQuerys unload(); method -
Is it possible that the event triggered by this event is $ (window)? Unload ();
? To be a little more specific, I'm only interested in this event when a user has closed the window (a popup), and not just when navigating from the current page.
I have seen the callback of event parameter unload () passed; But nothing appears in that object, which will be of use.
Does anyone know this solution?
Code:
$ (function () {$ (window). Unload (function (event) {//} This is clearly the pseudo code. Please help! If (event.type == 'closed') {// I had some expectations with these lines to work // make the content before the windows closed}}}}};
No, this is not possible for my knowledge. The document only learns about the unloading. Why is the business of the browser.
Comments
Post a Comment