1
在这里,我面临的问题与我写下来的代码检测browser's close event
使用户logged out
从网站。GWT WindowClosingHandler刷新浏览器刷新
但不幸的是在Refresh
此事件触发太:(。
Window.addWindowClosingHandler(new Window.ClosingHandler() {
public void onWindowClosing(Window.ClosingEvent closingEvent) {
closingEvent.setMessage("Do you really want to close the page?");
}
});
是的,我通过 GWT detect browser refresh in CloseHandler
走了,但我没有发现任何积极的结果出现。
按GWT Window.ClosingEvent class api:
Fired just before the browser window closes or navigates to a different site.
但我仍然希望能够检测到browser refresh
。
任何人都可以提供这方面的提示吗?
谢谢你的饼干hint.but不是为我工作。 – 2013-02-16 21:27:55
@TheSureshAtta代码确实有效。也许不像你想要的,对吧? – 2013-02-21 00:15:15