IpcMainEvent 对象继承自 Event
type
String - 可能的值包括frame
processId
Integer - 发送此消息的渲染器进程的内部 IDframeId
Integer - 发送此消息的渲染器框架的 IDreturnValue
any - 将其设置为要在同步消息中返回的值sender
WebContents - 返回发送消息的webContents
senderFrame
WebFrameMain | null 只读 - 发送此消息的框架。 如果在框架已导航或被销毁后访问,则可能为null
。ports
MessagePortMain[] - 随此消息传输的 MessagePort 列表reply
Function - 一个函数,它将向发送您当前正在处理的原始消息的渲染器框架发送 IPC 消息。 您应该使用此方法“回复”已发送的消息,以保证回复将发送到正确的进程和框架。channel
string...args
any[]