I try to call the code from this link https://stackoverflow.com/a/9100406/942113 with gwt jsni.
My method looks like
public static native void hideAddressBar() /*-{
if (document.documentElement.scrollHeight < $wnd.outerHeight * $wnd.devicePixelRatio) {
document.documentElement.style.height = ($wnd.outerHeight * $wnd.devicePixelRatio) + 'px';
}
setTimeout($wnd.scrollTo(1, 1), 0);
}-*/;
But when I call it, nothing happens.
My question: Isn't it possible to set the value of document.documentElement.style.height
with gwt jsni?