Remove returns from event listeners
This commit is contained in:
parent
a2b6731bf2
commit
cc7395eea8
15 changed files with 34 additions and 36 deletions
|
@ -30,7 +30,7 @@ exports.getSources = function (options, callback) {
|
|||
ipcRenderer.send('ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES', captureWindow, captureScreen, options.thumbnailSize, id)
|
||||
return ipcRenderer.once('ELECTRON_RENDERER_DESKTOP_CAPTURER_RESULT_' + id, function (event, sources) {
|
||||
var source
|
||||
return callback(null, (function () {
|
||||
callback(null, (function () {
|
||||
var i, len, results
|
||||
results = []
|
||||
for (i = 0, len = sources.length; i < len; i++) {
|
||||
|
|
|
@ -238,12 +238,12 @@ var metaToPlainObject = function (meta) {
|
|||
|
||||
// Browser calls a callback in renderer.
|
||||
ipcRenderer.on('ELECTRON_RENDERER_CALLBACK', function (event, id, args) {
|
||||
return callbacksRegistry.apply(id, metaToValue(args))
|
||||
callbacksRegistry.apply(id, metaToValue(args))
|
||||
})
|
||||
|
||||
// A callback in browser is released.
|
||||
ipcRenderer.on('ELECTRON_RENDERER_RELEASE_CALLBACK', function (event, id) {
|
||||
return callbacksRegistry.remove(id)
|
||||
callbacksRegistry.remove(id)
|
||||
})
|
||||
|
||||
// List all built-in modules in browser process.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue