Renderers can access Node APIs via the ‘node integration’ setting or via a preload script.
The main process really shouldn’t be used for anything except setup. Since it controls gpu paints amongst other things, blocking on it will cause visible stuttering and a bad user experience.
https://www.electronjs.org/blog/electron-internals-node-inte...