Initial commit.
This commit is contained in:
commit
b022bca449
20 changed files with 7405 additions and 0 deletions
16
preload.js
Normal file
16
preload.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Preload (Isolated World)
|
||||
const { contextBridge, ipcRenderer } = require('electron');
|
||||
|
||||
// We are not exposing anything to the renderer process for this simple app.
|
||||
// If we needed to, it would look something like this:
|
||||
/*
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
// Example: expose a function to send a message to the main process
|
||||
// sendMessage: (message) => ipcRenderer.send('some-channel', message),
|
||||
|
||||
// Example: expose a function to receive messages from the main process
|
||||
// onMessage: (callback) => ipcRenderer.on('other-channel', (_event, ...args) => callback(...args)),
|
||||
});
|
||||
*/
|
||||
|
||||
console.log('Preload script loaded. Context isolation is on.');
|
Loading…
Add table
Add a link
Reference in a new issue