Search code examples
javascripthtmlgoogle-chrome-appgoogle-chrome-os

What is the maximum width we can set in Outerbounds for Chrome app?


I have a chrome box which can support two monitors. Can I have single chrome app with dimensions 3840x1080 (width =3840, height =1080) for outerbound dimensions.

I tried this but it does not work, is there any possible way to do this?

Single chrome app to stretch on two monitors immediately after I open the chrome app


Solution

  • If you want to require a minimum height or width for your window, you can use minHeight or minWidth in your bounds specification.

    chrome.app.runtime.onLaunched.addListener(
      function() {
        chrome.app.window.create('index.html', { 
            outerBounds: { 
                width: 3840,
                height: 1080,
                minWidth: 3840,
                minHeight: 1080
             } 
        }); 
      });