How to make a chrome packaged app which runs in fullscreen at startup

google-chrome-app

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?

Best Answer

Now, you can just add the state:"fullscreen" property on your main .js:

chrome.app.runtime.onLaunched.addListener(
    function() {
        chrome.app.window.create('index.html',
            {
                state: "fullscreen",
            }
        );
    }
);

Make sure you don't add resizable: false or bounds properties, and you add a "fullscreen" permision on the manifest.json.

{
    ...
    "permissions": [
        ...
        "fullscreen"
    ]
}
Related Topic