Header menu logo fable-electron-docs-api

IpcMainEvent Type

Constructors

Constructor Description

IpcMainEvent(type, processId, frameId, returnValue, sender, senderFrame, ports, reply)

Full Usage: IpcMainEvent(type, processId, frameId, returnValue, sender, senderFrame, ports, reply)

Parameters:
    type : Type - Possible values include frame
    processId : int - The internal ID of the renderer process that sent this message
    frameId : int - The ID of the renderer frame that sent this message
    returnValue : obj - Set this to the value to be returned in a synchronous message
    sender : WebContents - Returns the webContents that sent the message
    senderFrame : Option<WebFrameMain> - The frame that sent this message. May be null if accessed after the frame has either navigated or been destroyed.
    ports : MessagePortMain[] - A list of MessagePorts that were transferred with this message
    reply : string * obj[] -> unit - A function that will send an IPC message to the renderer frame that sent the original message that you are currently handling. You should use this method to "reply" to the sent message in order to guarantee the reply will go to the correct process and frame.

Returns: IpcMainEvent
type : Type

Possible values include frame

processId : int

The internal ID of the renderer process that sent this message

frameId : int

The ID of the renderer frame that sent this message

returnValue : obj

Set this to the value to be returned in a synchronous message

sender : WebContents

Returns the webContents that sent the message

senderFrame : Option<WebFrameMain>

The frame that sent this message. May be null if accessed after the frame has either navigated or been destroyed.

ports : MessagePortMain[]

A list of MessagePorts that were transferred with this message

reply : string * obj[] -> unit

A function that will send an IPC message to the renderer frame that sent the original message that you are currently handling. You should use this method to "reply" to the sent message in order to guarantee the reply will go to the correct process and frame.

Returns: IpcMainEvent

Instance members

Instance member Description

this.frameId

Full Usage: this.frameId

The ID of the renderer frame that sent this message

this.ports

Full Usage: this.ports

A list of MessagePorts that were transferred with this message

this.processId

Full Usage: this.processId

The internal ID of the renderer process that sent this message

this.reply

Full Usage: this.reply

A function that will send an IPC message to the renderer frame that sent the original message that you are currently handling. You should use this method to "reply" to the sent message in order to guarantee the reply will go to the correct process and frame.

this.returnValue

Full Usage: this.returnValue

Set this to the value to be returned in a synchronous message

this.sender

Full Usage: this.sender

Returns the webContents that sent the message

this.senderFrame

Full Usage: this.senderFrame

Returns: Option<WebFrameMain>

The frame that sent this message. May be null if accessed after the frame has either navigated or been destroyed.

Returns: Option<WebFrameMain>

this.type

Full Usage: this.type

Possible values include frame

Type something to start searching.