Open zicjin opened 3 years ago
Electron 12 it will be enabled contextIsolation by default. https://www.electronjs.org/docs/tutorial/context-isolation
contextBridge.exposeInMainWorld('electron', { getSocketId: () => socketPromise, ipcConnect: (id, func) => { ipc.config.silent = true ipc.connectTo(id, () => { func(ipc.of[id]) }) }, ... })
got error:
const connectSocket = (socketId: string) => { window.electron.ipcConnect(socketId, (client) => { client.on('message', (data: string) => { const msg = JSON.parse(data) ...
Electron 12 it will be enabled contextIsolation by default. https://www.electronjs.org/docs/tutorial/context-isolation
got error: