GWT Update Event Detection

We need to define an update event (f5) / web application reload. Is there an event in GWT that can detect this?

thanks MJ

+6
source share
1 answer

Add a window close handler :

HandlerRegistration registration = Window.addClosingHandler(new ClosingHandler() { void onWindowClosing(ClosingEvent event) { // call the server, or whatever } }); 

EDIT

HandlerRegistration used to unregister Handler if you no longer need it.

+8
source

Source: https://habr.com/ru/post/890599/


All Articles