refactor: preload communication

This commit is contained in:
草鞋没号
2021-09-09 09:37:02 +08:00
parent 4f7f92cbe7
commit 3be1848c8c
13 changed files with 109 additions and 86 deletions

View File

@@ -0,0 +1,8 @@
/**
* Renderer and Main bridge
* @refresh https://newbedev.com/how-to-use-preload-js-properly-in-electron
*/
import { contextBridge, ipcRenderer } from 'electron'
contextBridge.exposeInMainWorld('ipcRenderer', ipcRenderer)