2021-07-08 18:42:28 +00:00
|
|
|
// All of the Node.js APIs are available in the preload process.
|
|
|
|
// It has the same sandbox as a Chrome extension.
|
|
|
|
const { contextBridge, ipcRenderer } = require('electron')
|
|
|
|
|
|
|
|
// Set up context bridge between the renderer process and the main process
|
|
|
|
contextBridge.exposeInMainWorld(
|
|
|
|
'shell',
|
|
|
|
{
|
2023-04-05 13:42:20 +00:00
|
|
|
open: () => ipcRenderer.send('shell:open')
|
2021-07-08 18:42:28 +00:00
|
|
|
}
|
2023-04-05 13:42:20 +00:00
|
|
|
)
|