How to make chrome extension in full screen?

I'm trying to make a chrome extension in full screen, but the max I can do is half the width. Moreover, it just gives me a scrollbar below. How can I do this in full screen? What does the entire width of the Chrome browser mean? Thank!

+5
source share
5 answers
chrome.windows.update(windowId, { state: "fullscreen" })

See http://developer.chrome.com/extensions/windows.html#method-update

+9
source

In your extensions of the "background.js" script:

chrome.app.runtime.onLaunched.addListener(function (launchData) {
  chrome.app.window.create(
    // Url
    '/editor.html',
    // CreateWindowOptions
    {
            'width': 400,
            'height': 500
    },
    // Callback
    function(win) {
        win.contentWindow.launchData = launchData;
        win.maximize();
        win.show();
    });
});
+2
source
+1
addEventListener("click", function() {
    var
          el = document.documentElement
        , rfs =
               el.requestFullScreen
            || el.webkitRequestFullScreen
            || el.mozRequestFullScreen
    ;
    rfs.call(el);
});

+1

for general use on web pages in all browsers, including msRequestFullscreen

addEventListener("click", function () {
    var
          el = document.documentElement
        , rfs =
               el.requestFullScreen
            || el.webkitRequestFullScreen
            || el.mozRequestFullScreen
            || el.msRequestFullscreen
    ;
    if (rfs) { rfs.call(el); } else { console.log('fullscreen api not supported');}
});
0
source

All Articles