Remove returns from event listeners
This commit is contained in:
parent
a2b6731bf2
commit
cc7395eea8
15 changed files with 34 additions and 36 deletions
|
@ -125,7 +125,7 @@ let wrapWebContents = function (webContents) {
|
|||
|
||||
// Dispatch IPC messages to the ipc module.
|
||||
webContents.on('ipc-message', function (event, [channel, ...args]) {
|
||||
return ipcMain.emit.apply(ipcMain, [channel, event].concat(args))
|
||||
ipcMain.emit.apply(ipcMain, [channel, event].concat(args))
|
||||
})
|
||||
webContents.on('ipc-message-sync', function (event, [channel, ...args]) {
|
||||
Object.defineProperty(event, 'returnValue', {
|
||||
|
@ -141,9 +141,8 @@ let wrapWebContents = function (webContents) {
|
|||
|
||||
// Handle context menu action request from pepper plugin.
|
||||
webContents.on('pepper-context-menu', function (event, params) {
|
||||
var menu
|
||||
menu = Menu.buildFromTemplate(params.menu)
|
||||
return menu.popup(params.x, params.y)
|
||||
const menu = Menu.buildFromTemplate(params.menu)
|
||||
menu.popup(params.x, params.y)
|
||||
})
|
||||
|
||||
// The devtools requests the webContents to reload.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue