I wanted to know when the visibilitychange event was fired (ie: the browser 
is minimised).  I've coded it in JavaScript, as I couldn't see it being 
supported in GWT:

private static native final String getVisibilityState() /*-{
> return document.visibilityState;
> }-*/;
> private static native final void listenForVisibliltyChange(Command 
> onChange) /*-{
> document.addEventListener("visibilitychange", function() {
> onchan...@com.google.gwt.user.client.Command::execute(*)();
> }, false);
> }-*/;

I'm not sure if doing calls like this causes memory leaks or anything. 
 Please shout out if you know of any issues doing it this way.


You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to