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