mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-22 23:24:22 +08:00
13 lines
458 B
JavaScript
13 lines
458 B
JavaScript
/**
|
|
* The preload script runs before. It has access to web APIs
|
|
* as well as Electron's renderer process modules and some
|
|
* polyfilled Node.js functions.
|
|
*
|
|
* https://www.electronjs.org/docs/latest/tutorial/sandbox
|
|
*/
|
|
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('electronAPI', {
|
|
startDesign: () => ipcRenderer.send('start-design', ""),
|
|
startInvoke: () => ipcRenderer.send('start-invoke', ""),
|
|
}) |