Change webContents -> options.webContents

This commit is contained in:
Ryohei Ikegami 2017-03-28 19:58:23 +09:00
parent 87565f4c84
commit de2019f6b8

View file

@ -242,12 +242,11 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN', function (event
disposition, options,
additionalFeatures, postData) {
options = mergeBrowserWindowOptions(event.sender, options)
const {webContents} = options
event.sender.emit('new-window', event, url, frameName, disposition, options, additionalFeatures)
const newGuest = event.newGuest
if ((event.sender.isGuest() && !event.sender.allowPopups) || event.defaultPrevented) {
if (newGuest !== undefined && newGuest !== null) {
if (webContents === newGuest.webContents) {
if (options.webContents === newGuest.webContents) {
event.defaultPrevented = false
}
event.returnValue = setupGuest(event.sender, frameName, newGuest, options)