browser: fix disposition value for new-window event

This commit is contained in:
Robo 2016-03-25 08:47:33 +05:30 committed by deepak1556
parent 7353fb4296
commit 7016fbe258
4 changed files with 10 additions and 7 deletions

View file

@ -100,6 +100,7 @@ window.open = function (url, frameName, features) {
// TODO remove hyphenated options in both of the following arrays for 1.0
const ints = ['x', 'y', 'width', 'height', 'min-width', 'minWidth', 'max-width', 'maxWidth', 'min-height', 'minHeight', 'max-height', 'maxHeight', 'zoom-factor', 'zoomFactor']
const webPreferences = ['zoom-factor', 'zoomFactor', 'node-integration', 'nodeIntegration', 'preload']
const disposition = 'new-window'
// Make sure to get rid of excessive whitespace in the property name
ref1 = features.split(/,\s*/)
@ -146,7 +147,7 @@ window.open = function (url, frameName, features) {
options[name] = parseInt(options[name], 10)
}
}
guestId = ipcRenderer.sendSync('ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', url, frameName, options)
guestId = ipcRenderer.sendSync('ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', url, frameName, disposition, options)
if (guestId) {
return BrowserWindowProxy.getOrCreate(guestId)
} else {