2
휴대 기기에서 내 GWT 앱의 검색 주소창을 숨기려고합니다. 내 모바일 코드에서 아래 JSNI 함수를 호출하고 있지만 작동하지 않습니다. 당신이 생각할 수있는 솔루션은 JQuery를 포함하지 않습니다.GWT : 휴대 기기에서 주소창 숨기기
public static native void hideBar()
/*-{
$($doc).ready(function() {
function hideAddressBar() {
if($doc.documentElement.scrollHeight < $wnd.outerHeight/$wnd.devicePixelRatio) {
$doc.documentElement.style.height = ($wnd.outerHeight/$wnd.devicePixelRatio) + "px";
}
}
$wnd.addEventListener("load", function() { hideAddressBar(); });
$wnd.addEventListener("orientationchange", function() { hideAddressBar(); });
});
}-*/;