Skip to content

1681-engine / electron / registerSessionStore

Function: registerSessionStore() ​

ts
function registerSessionStore(
   ipcMain, 
   store, 
   prefix?
): () => void;

Defined in: src/electron/sessionStore.ts:79

Answers a renderer's <prefix>:get, <prefix>:set (one string) and <prefix>:clear from store, so the page only ever sees the plain value, and only its own. Expose them in the preload with ipcRenderer.invoke. Returns a function that removes the handlers.

Parameters ​

ParameterTypeDefault value
ipcMainIpcMainLikeundefined
storeSessionStoreundefined
prefixstring'session'

Returns ​

() => void

Released under the MIT License.