mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
7c2574b1ca
Co-authored-by: Himself65 <himself65@outlook.com>
19 lines
535 B
TypeScript
19 lines
535 B
TypeScript
/**
|
|
* @module preload
|
|
*/
|
|
|
|
import { contextBridge } from 'electron';
|
|
|
|
import * as affineApis from './affine-apis';
|
|
|
|
/**
|
|
* The "Main World" is the JavaScript context that your main renderer code runs in.
|
|
* By default, the page you load in your renderer executes code in this world.
|
|
*
|
|
* @see https://www.electronjs.org/docs/api/context-bridge
|
|
*/
|
|
|
|
contextBridge.exposeInMainWorld('apis', affineApis.apis);
|
|
contextBridge.exposeInMainWorld('events', affineApis.events);
|
|
contextBridge.exposeInMainWorld('appInfo', affineApis.appInfo);
|