Skip to content

ElectronIpcMainEvent

Unofficial

Event passed as the first argument to ipcMain on/once listeners.

Import:

import type { ElectronIpcMainEvent } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ElectronIpcMainEvent

Properties

PropertyTypeDescription
frameIdnumberThe ID of the renderer frame that sent this message.
portsElectronMessagePortMain[]A list of message ports that were transferred with this message.
processIdnumberThe internal ID of the renderer process that sent this message.
returnValueunknownSet this to the value to be returned in a synchronous message.
senderElectronWebContentsThe webContents that sent the message.
senderFrameElectronWebFrameMainThe frame that sent this message.

Methods

MethodReturnsDescription
reply(channel, args?)voidSends an IPC message to the renderer frame that sent the original message that is currently being handled. Use this method to "reply" to the sent message in order to guarantee the reply goes to the correct process and frame.