diff --git a/lib/browser/guest-window-manager.js b/lib/browser/guest-window-manager.js index f6e43c33b8ca..c75e33882395 100644 --- a/lib/browser/guest-window-manager.js +++ b/lib/browser/guest-window-manager.js @@ -243,7 +243,9 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN', function (event additionalFeatures, postData) { options = mergeBrowserWindowOptions(event.sender, options) const newWindowEvent = { - preventDefault: () => newWindowEvent.defaultPrevented = true + preventDefault: function () { + this.defaultPrevented = true + } } event.sender.emit('new-window', newWindowEvent, url, frameName, disposition, options, additionalFeatures) const newGuest = newWindowEvent.newGuest