How can I make a chrome packaged app which runs in fullscreen at startup?

后端 未结 6 892
悲&欢浪女
悲&欢浪女 2021-02-14 06:39

Currently it seems that the fullscreen ability can only be activated from a user action (mouse/keyboard event). Is there a way to circumvent this?

6条回答
  •  深忆病人
    2021-02-14 07:27

    I have got it working with below code

    chrome.app.runtime.onLaunched.addListener(function() {
        chrome.app.window.create('index.html', {
        'width': 1024,
        'height': 768
    },
    function(win) {
        win.maximize();
    });
    });
    

提交回复
热议问题