MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / requireEventWindow

Function requireEventWindow

apps/desktop/src/main/index.ts:627–633  ·  view source on GitHub ↗
(event: IpcMainEvent | IpcMainInvokeEvent)

Source from the content-addressed store, hash-verified

625}
626
627function requireEventWindow(event: IpcMainEvent | IpcMainInvokeEvent): BrowserWindow {
628 const win = BrowserWindow.fromWebContents(event.sender)
629 if (!win || win.isDestroyed()) {
630 throw new Error('No window is associated with this IPC call.')
631 }
632 return win
633}
634
635function isPathInsideVault(absPath: string): boolean {
636 const win = currentIpcWindow()

Callers 3

handleFunction · 0.85
onFunction · 0.85
registerIpcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected