ipcrenderer

Unable To Pass Objects/Arrays in IPCRenderer, An object could not be cloned EventEmitter.i.send.i.send

若如初见. 提交于 2020-12-31 05:41:10
问题 I am unable to pass any object or arrays to IPCRenderer. I am getting error when passing an object or array through ipcs, I have even tried to send by converting to string using JSON.stringify but it converts it into empty object string. I have tried passing a fileList, an array of object & even an object nothing passes. only string or handwritten objects are working. I've read that it uses Structured Clone Algorithm and fileList & Array is allowed by this algorithm ERROR: electron/js2c

Unable To Pass Objects/Arrays in IPCRenderer, An object could not be cloned EventEmitter.i.send.i.send

点点圈 提交于 2020-12-31 05:40:55
问题 I am unable to pass any object or arrays to IPCRenderer. I am getting error when passing an object or array through ipcs, I have even tried to send by converting to string using JSON.stringify but it converts it into empty object string. I have tried passing a fileList, an array of object & even an object nothing passes. only string or handwritten objects are working. I've read that it uses Structured Clone Algorithm and fileList & Array is allowed by this algorithm ERROR: electron/js2c

Unable To Pass Objects/Arrays in IPCRenderer, An object could not be cloned EventEmitter.i.send.i.send

此生再无相见时 提交于 2020-12-31 05:40:30
问题 I am unable to pass any object or arrays to IPCRenderer. I am getting error when passing an object or array through ipcs, I have even tried to send by converting to string using JSON.stringify but it converts it into empty object string. I have tried passing a fileList, an array of object & even an object nothing passes. only string or handwritten objects are working. I've read that it uses Structured Clone Algorithm and fileList & Array is allowed by this algorithm ERROR: electron/js2c

Why is my ipcMain not sending to ipcRenderer in Electron?

醉酒当歌 提交于 2019-12-24 10:56:29
问题 New to electron I've figured out how to send from Renderer to Main but I'm trying to learn how to go from Main to Renderer . In my research I've read: IPC send from main process to renderer and tried: main.js : const { app, ipcMain, Menu } = require('electron') const appVersion = process.env.npm_package_version const mainWindow = require('./renderer/mainWindow') app.on('ready', () => { mainWindow.createWindow(), console.log(`Trying to send app version to renderer: ${appVersion}`), mainWindow