@JsType(prototype="Window")
public interface Window {
static Window window() {
// returns $wnd;
return Util.getWindow();
}
void alert(String msg);
}
Window.window().alert("Does this work?");
Maybe it's premature to ask this, but the compiler chokes on this with an out of memory error.
For Reference:
public class Util {
public static native Window getWindow() /*-{
return $wnd;
}-*/;
}