|
@@ -132,6 +132,8 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_CLOSE', function (event, guestI
|
|
|
const guestWindow = getGuestWindow(guestId)
|
|
|
if (guestWindow != null && canAccessWindow(event.sender, guestWindow.webContents)) {
|
|
|
guestWindow.destroy()
|
|
|
+ } else {
|
|
|
+ console.error(`Blocked ${event.sender.getURL()} from closing its opener.`)
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -140,6 +142,7 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', function (event, guest
|
|
|
if (guestWindow != null && canAccessWindow(event.sender, guestWindow.webContents)) {
|
|
|
event.returnValue = guestWindow[method].apply(guestWindow, args)
|
|
|
} else {
|
|
|
+ console.error(`Blocked ${event.sender.getURL()} from calling ${method} of its opener.`)
|
|
|
event.returnValue = null
|
|
|
}
|
|
|
})
|
|
@@ -161,5 +164,7 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', function (event,
|
|
|
const guestContents = webContents.fromId(guestId)
|
|
|
if (guestContents != null && canAccessWindow(event.sender, guestContents)) {
|
|
|
guestContents[method].apply(guestContents, args)
|
|
|
+ } else {
|
|
|
+ console.error(`Blocked ${event.sender.getURL()} from calling ${method} of its opener.`)
|
|
|
}
|
|
|
})
|