0

Estou estudando a api do chrome para criar extensões, baixei um exemplo e estou modificando. Estou querendo que minha extensão já inicie fullscreen, fiz varias modificações porém nenhum funcionou. Dei permissão no manifest e nada. Segue meu código abaixo:

chrome.app.runtime.onLaunched.addListener(function() {
  // Center window on screen.
  var screenWidth = screen.availWidth;
  var screenHeight = screen.availHeight;
  var width = 500;
  var height = 300;

  chrome.app.window.create('index.html', {
    id: "helloWorldID",
    outerBounds: {
      width: width,
      height: height,
      left: Math.round((screenWidth-width)/2),
      top: Math.round((screenHeight-height)/2)
    }
  });

});

2 Respostas 2

0
chrome.windows.update(windowId, { state: "fullscreen" })

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

0
0

O que funcionou comigo foi criar um arquivo javascript externo com o seguinte código:

setTimeout(chrome.app.window.current().fullscreen,0);

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .