Use sender.id instead of sender.webContents.id

This commit is contained in:
Kevin Sawicki 2016-11-16 07:50:24 -08:00
parent 92577c37c8
commit 651eaec64f

View file

@ -163,7 +163,7 @@ const getGuestWindow = function (guestId) {
// The W3C does not have anything on this, but from my understanding of the
// security model of |window.opener|, this should be fine.
const canAccessWindow = function (sender, target) {
return (target.getWebPreferences().openerId === sender.webContents.id) ||
return (target.getWebPreferences().openerId === sender.id) ||
(sender.getWebPreferences().nodeIntegration === true) ||
isSameOrigin(sender.getURL(), target.getURL())
}