Reputation: 2466
I have the following code:
var currentWindow = chrome.app.window.current();
currentWindow.close();
chrome.app.window.create('connectionError.html', {id: 'connectionError', state: 'fullscreen'});
I also have the "fullscreen" permission in my manifest file. When I execute the code, the current window does close, but when it attempts to create the new window I just get a black screen in front of the window. If I alt-tab over to the newly created window it's not in fullscreen mode. Am I doing something wrong here?
Upvotes: 0
Views: 106
Reputation: 20508
The window may be getting closed before the new one is opened. Try this:
chrome.app.window.create('connectionError.html', { id: 'connectionError', state: 'fullscreen'}, function() { chrome.app.window.current().close() })
Upvotes: 1