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

Function ipcSendSync

resources/preload.js:9–13  ·  view source on GitHub ↗
(apiName, args)

Source from the content-addressed store, hash-verified

7 * 如果主进程返回 Error 实例,自动抛出异常
8 */
9const ipcSendSync = (apiName, args) => {
10 const result = electron.ipcRenderer.sendSync('plugin.api', apiName, args)
11 if (result instanceof Error) throw result
12 return result
13}
14
15/**
16 * 异步 IPC 调用 - 通过 plugin.api 通道发送异步消息

Callers 1

preload.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected