google chrome app - Can't use the window.api properly -


i trying create borderless chrome app custom "control panel" closing/minimizing/maximizing.

i have 3 divs (#minimize, #maximize, #close) act buttons. trying handle clicks javascript obviously. have main.js included in html header has code want. closing window code looks this:

document.queryselector('#close').onclick = function() {   window.close(); } 

that works charm.

as maximizing window tried:

document.queryselector('#maximize').onclick = function() {   window.maximize(); } 

which not work. did work was:

document.queryselector('#maximize').onclick = function() { window.moveto(0,0)     window.resizeto(screen.width,screen.height); } 

i guess missing obvious. window.hide() not work , impossible call other appwindow functions such getbounds. know doing wrong here?

the window object trying manipulate not chrome's appwindow. use chrome.app.window.current().maximize() etc.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -