Hey Janne, 2010/11/2 Janne Rönkkö <[email protected]>: > Hi, > > If I use Chrome or Opera and refresh the page the function > WApplication::unload is not being called. With IE and Firefox the > function is called. > Shouldn't the unload be called also with Chrome and Opera?
We are still trying to find out if Chrome actually supports "onunload". It seems to support "onbeforeunload", but we cannot use this event because the user may also be asked to confirm the unloading (WApplication::setConfirmCloseMessage()) and we have no way of knowing what the user ended up chosing. I believe opera doesn't support it all. Judging from the jQuery discussion on its equivalent .unload() method, there seems to be a general problem with the page unload event. To be sure that some code is being executed when the application is terminated, you should therefore put it in the (application/widget) destructors. Regards, koen ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
