跳转至

IpcMainEvent 对象继承自 Event

  • type String - 可能的值包括 frame
  • processId Integer - 发送此消息的渲染进程的内部 ID
  • frameId Integer - 发送此消息的渲染帧的 ID
  • returnValue any - 将其设置为要在同步消息中返回的值
  • sender WebContents - 返回发送该消息的 webContents
  • senderFrame WebFrameMain | null 只读 - 发送此消息的帧。如果在该帧导航或销毁后访问,可能为 null。
  • ports MessagePortMain[] - 与此消息一起传输的 MessagePort 列表
  • reply Function - 一个函数,用于向发送原始消息的渲染帧发送 IPC 消息,该原始消息即你当前正在处理的消息。 应使用此方法"回复"已发送的消息,以确保回复发送到正确的进程和帧。
  • channel string
  • ...args any[]

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 el/electron