Skip to main content

IpcMainEvent Object extends Event

  • processId Integer - The internal ID of the renderer process that sent this message发送此消息的呈现器进程的内部ID
  • frameId Integer - The ID of the renderer frame that sent this message发送此消息的渲染器帧的ID
  • returnValue any - Set this to the value to be returned in a synchronous message将其设置为要在同步消息中返回的值
  • sender WebContents - Returns the webContents that sent the message返回发送消息的webContents
  • senderFrame WebFrameMain Readonly - The frame that sent this message发送此消息的帧
  • ports MessagePortMain[] - A list of MessagePorts that were transferred with this message与此消息一起传输的MessagePort列表
  • reply Function - A function that will send an IPC message to the renderer frame that sent the original message that you are currently handling. 一个函数,它将向发送当前正在处理的原始消息的渲染器帧发送IPC消息。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.您应该使用此方法对发送的消息进行“回复”,以确保回复将进入正确的流程和框架。
    • channel string
    • ...args any[]