I'm curious why you have such a specific requirement. When would you only want a window closing event to fire on browser close?
Anyway, I don't think you can do that. Each window or tab shouldn't know about any window or tab it didn't create. It might be possible to detect browser close through an extension/add-on, but I haven't ever looked into it. Actually, it might be possible to do that on modern browsers using sessionStorage. You may be able to add an event to be notified when the session is being destroyed (which *should* be on browser close...), but I haven't ever tried that. Would your requirements allow you to do something on user return? If so, you could (again) use session storage or a cookie to let you know if you've seen the user before. If you haven't this time, then you can do whatever cleanup necessary (or whatever you're trying to do). Derek On Aug 12, 7:59 pm, Jose María Zaragoza <[email protected]> wrote: > Hi: > > I would like to detect *only* when browser is closing > > About WindowCloseListener documentation, events are fired after the > browser window closes or navigates to a different site. > And I dont want to do anything when go to another site > > How I can to know this ? > > Thanks and regards -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
