Comment by koito17
In the case of Electron, there is a "main process" that is a Node.js process. This process has the capability to spawn "renderer processes", each browser window is a "renderer process". Through ipcMain and ipcRenderer, Node and Chromium have bidirectional comminication.
I don't think renderer processes run Node. Per the documentation,
[C]ode ran in renderer processes should behave according to web standards ... [T]he renderer has no direct access to require or other Node.js APIs
https://www.electronjs.org/docs/latest/tutorial/process-mode...
Renderers can access Node APIs via the ‘node integration’ setting or via a preload script.