How can I create new window with full of available space in display screen.
function CreateWindow () {
chrome.app.window.create("Spreadsheet.html" , {
"bounds" : {
"width" : 500, // need full width and height
"height": 400
}
});
}
chrome.app.runtime.onLaunched.addListener(CreateWindow);
解决方案
You cannot access window.innerWidth and height though you can use below code
function CreateWindow () {
chrome.app.window.create("Spreadsheet.html" , {
"bounds" : {
"width" : window.screen.availWidth,
"height": window.screen.availHeight
}
});
}
chrome.app.runtime.onLaunched.addListener(CreateWindow);