MCPcopy
hub / github.com/ZToolsCenter/ZTools / notifyRenderer

Method notifyRenderer

src/main/api/renderer/commands.ts:52–56  ·  view source on GitHub ↗

* 安全地向渲染进程发送消息

(channel: string, ...args: any[])

Source from the content-addressed store, hash-verified

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

Callers 9

preparePluginLaunchMethod · 0.95
launchMethod · 0.95
launchAsAdminMethod · 0.95
addToHistoryMethod · 0.95
removeFromHistoryMethod · 0.95
pinAppMethod · 0.95
unpinAppMethod · 0.95
updatePinnedOrderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected