Node's integration with Electron refers to the ability to access Node.js resources from within the rendering process; with this, we can make use of the Electron API from the website in an easy and direct way.
The integration with Node is disabled by default in Electron and for final or production applications it is recommended to disable it as a security measure.
Being able to use Node from the web page (and with this, being able to import and use any package), is essential to carry out various operations that, in summary, such as communication between processes that we will see in the next section; To enable the integration with Node, we put:
index.js
let win = new BrowserWindow({
width: 800,
height:600,
webPreferences:{
nodeIntegration: true,
contextIsolation: false
}
})
Remember that the previous material is part of mi curso para iniciales sobre Electron.js
- Andrés Cruz
![Andrés Cruz Andrés Cruz](/public/images/perfil.jpg)
Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter