I wanna close the browser window (similar to javascript:window.close()). Is there any
correpsponding API in GWT or in Ext-GWT (GXT)?
I don’t want to make a native call to do this, I want a Java solution.
native public static void close()/-{
$wnd.close(); }-/;
Thanks in advance.
GWT provides access to browser window’s methods via the class
com.google.gwt.user.client.Windowwith some static methods. Currently there is noclose()method (unlikeopen()).Since the GWT Window class itself is working with the JSNI I don’t think you will find a possibility to access the browser window in a pure Java way (and how should that work at all?).
If you don’t want to use JSNI in your existing code you could create something like the GWT Window class adjusted to your needs.