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[]