electron-ipc-module
    Preparing search index...

    Variable handleOnce

    handleOnce: <TArgs extends any[] = any[], TResult = any>(
        fn: IpcHandler<TArgs, TResult, IpcEventMap>,
    ) => CloneableChannel<
        HandlerDef<TArgs, TResult, IpcEventMap>,
        TArgs,
        TResult,
    >

    Type Declaration

      • <TArgs extends any[] = any[], TResult = any>(
            fn: IpcHandler<TArgs, TResult, IpcEventMap>,
        ): CloneableChannel<HandlerDef<TArgs, TResult, IpcEventMap>, TArgs, TResult>
      • Register a one-shot request/response channel via ipcMain.handleOnce.

        Scoped to the process, not a window: ipcMain is global, so the first caller from any window consumes the handler and every later invoke — including from other windows — rejects with "No handler registered". Use handle for anything a multi-window app can call more than once.

        Type Parameters

        • TArgs extends any[] = any[]
        • TResult = any

        Parameters

        Returns CloneableChannel<HandlerDef<TArgs, TResult, IpcEventMap>, TArgs, TResult>