One thing you can try is to have a separate module class to test the placement mode, which is a subclass of your real module. In the hosted mode version of the module, you may have some JSNI that resizes the window:
public class MyModule implements EntryPoint {
}
public class HostedModeMyModule extends MyModule {
private native void resizeWindow() ;
public void onModuleLoad() {
resizeWindow();
super.onModuleLoad();
}
}
You must have two gwt.xml files, of course, one for testing and one for compilation.
This is not the most elegant approach, but all I can think of.
source
share