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

Function attach

resources/preload.js:84–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 let listening = false
83 return {
84 attach() {
85 if (!listening) {
86 electron.ipcRenderer.on(channel, handler)
87 listening = true
88 }
89 },
90 detach() {
91 if (listening) {
92 electron.ipcRenderer.removeListener(channel, handler)

Callers

nothing calls this directly

Calls 1

onMethod · 0.80

Tested by

no test coverage detected