main: add context bridge communication example via preload script, set nodeIntegration to false by default, improve security
This commit is contained in:
1 parent
a540caf9d3
commit
8057a3521a
9 files changed
+64
-12
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { BrowserWindow, ipcMain } from 'electron'
|
||||
import Constants from './utils/Constants'
|
||||
|
||||
/*
|
||||
* IPC Communications
|
||||
* */
|
||||
export default class IPCs {
|
||||
static initialize(window: BrowserWindow) {
|
||||
// Get application version
|
||||
ipcMain.on('msgRequestGetVersion', () => {
|
||||
window.webContents.send('msgReceivedVersion', Constants.APP_VERSION)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user