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

Property Type Description
frameId number The ID of the renderer frame that sent this message.
ports ElectronMessagePortMain[] A list of message ports that were transferred with this message.
processId number The internal ID of the renderer process that sent this message.
returnValue unknown Set this to the value to be returned in a synchronous message.
sender ElectronWebContents The webContents that sent the message.
senderFrame ElectronWebFrameMain The frame that sent this message.

Methods

Method Returns Description
reply(channel, args?) void Sends 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.