このリンクhttps://stackoverflow.com/a/9100406/942113からgwtjsniを使用してコードを呼び出そうとしています 。
私の方法は次のようになります
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);
}-*/;
しかし、私がそれを呼ぶとき、何も起こりません。
私の質問:document.documentElement.style.height
gwt jsniでの値を設定することはできませんか?