* 安全地向渲染进程发送消息
(channel: string, ...args: any[])
| 50 | * 安全地向渲染进程发送消息 |
| 51 | */ |
| 52 | private notifyRenderer(channel: string, ...args: any[]): void { |
| 53 | if (this.mainWindow && !this.mainWindow.isDestroyed()) { |
| 54 | this.mainWindow.webContents.send(channel, ...args) |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | public init(mainWindow: Electron.BrowserWindow, pluginManager: PluginManager): void { |
| 59 | this.mainWindow = mainWindow |
no outgoing calls
no test coverage detected