mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-24 18:51:24 +00:00
tighten up csp
This commit is contained in:
@@ -5,11 +5,16 @@ console.log('User Preload!');
|
||||
const { contextBridge, shell, ipcRenderer } = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
openExternal: (url) => shell.openExternal(url)
|
||||
openExternal: (url) => shell.openExternal(url),
|
||||
setAllowedDomains: (domains) => {
|
||||
ipcRenderer.send('set-allowed-domains', domains);
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('electron', {
|
||||
onUpdateAvailable: (callback) => ipcRenderer.on('update_available', callback),
|
||||
onUpdateDownloaded: (callback) => ipcRenderer.on('update_downloaded', callback),
|
||||
restartApp: () => ipcRenderer.send('restart_app')
|
||||
});
|
||||
});
|
||||
|
||||
ipcRenderer.send('test-ipc');
|
Reference in New Issue
Block a user