GWT back button browser

后端 未结 5 869
长情又很酷
长情又很酷 2021-01-18 11:08

For example current page is www.google.com. But I typed a different website address in address bar and clicked. This site has fully GWT code.

But I like to back to t

5条回答
  •  天命终不由人
    2021-01-18 11:58

    +1 to Igor and Alex. Here's some code you can use, if you want to use the ClosingHandler:

        Window.addWindowClosingHandler(new Window.ClosingHandler() {
    
            @Override
            public void onWindowClosing(final ClosingEvent event) {
                event.setMessage("Don't you think my site is awesome?");
            }
        });
    

    Some info from the Javadoc of ClosingHandler.onWindowClosing():

     /* Fired just before the browser window closes or navigates to a different
      * site. No user-interface may be displayed during shutdown. */
    

提交回复
热议问题