You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
483 B
13 lines
483 B
'use strict' |
|
|
|
const { contextBridge, ipcRenderer } = require('electron') |
|
|
|
contextBridge.exposeInMainWorld('imwaldElectron', { |
|
isElectron: true, |
|
reloadApp: () => ipcRenderer.invoke('imwald:reload-app'), |
|
/** |
|
* Same-origin translate / LanguageTool from the renderer hits CORS when the shell is loopback. |
|
* Main process performs the HTTP(S) request (allowlisted host + path only). |
|
*/ |
|
backendRequest: (payload) => ipcRenderer.invoke('imwald:backend-request', payload) |
|
})
|
|
|