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

Function replayPendingPluginEnterIfNeeded

resources/preload.js:218–229  ·  view source on GitHub ↗

* 回放缓存的进入事件(仅保留最新一条)

()

Source from the content-addressed store, hash-verified

216 * 回放缓存的进入事件(仅保留最新一条)
217 */
218function replayPendingPluginEnterIfNeeded() {
219 if (!enterCallback || !pendingEnterPayload) return
220 const replayPayload = pendingEnterPayload
221 const replayMeta = pendingEnterMeta
222 // 清空后再异步回放,避免重复触发
223 pendingEnterPayload = null
224 pendingEnterMeta = null
225 console.log('[PluginRuntime][Enter] replay-pending', replayMeta || {})
226 queueMicrotask(() => {
227 dispatchPluginEnter(replayPayload)
228 })
229}
230
231// 获取操作系统类型
232const osType = electron.ipcRenderer.sendSync('get-os-type')

Callers 1

preload.jsFile · 0.85

Calls 1

dispatchPluginEnterFunction · 0.85

Tested by

no test coverage detected