BrowserUtils.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:WebConsole 作者:
private static void initMobile() {
    // Prevent window scrolling
    RootPanel.get().addDomHandler(new TouchMoveHandler() {
        public void onTouchMove(TouchMoveEvent e) {
                e.preventDefault();
        }
    }, TouchMoveEvent.getType());

    Window.scrollTo(0, 1);
    new Timer() {
        public void run() {
            Window.scrollTo(0, 1);
        }
    }.schedule(1000);

    // Determine current window orientation
    if (getWindowHeight() < getWindowWidth()) {
        windowOrientation = "landscape";
    }

    // Create a native orientation change handler as resize handler isn't reliable on iOS 3.x
    addNativeOrientationHandler();

   // If Apple device then check if loaded from bookmark
    if (!isBookmarked()) {
        Window.alert("Please add this page to your Home Screen to view in fullscreen!");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号