ElectronIpcRenderer.sendSync method
ElectronIpcRenderer › sendSync
Unofficial
Sends a message to the main process viachannel and expects a result synchronously.The main process handles it by listening for
channel with the ipcMain module and replies by setting event.returnValue. Sending a synchronous message blocks the whole renderer process until the reply is received, so use this only as a last resort. Signature:
sendSync(channel: string, args?: unknown[]): unknownParameters:
| Parameter | Type | Description |
|---|---|---|
| channel | string | The IPC channel name. |
| args? | unknown[] | Arguments to send. |
Returns: unknown — The value sent back by the ipcMain handler.