Re:Show HN: Electrico – Electron Without Node and Chrome (Ru...
by notpushkin on Tuesday September 17, 2024 @07:15AM
(#41566449)
> Renderer processes can be spawned with a full Node.js environment for ease of development. Historically, this used to be the default, but this feature was disabled for security reasons.
Makes sense.
Re:Show HN: Electrico – Electron Without Node and Chrome (Ru...
by killcoder on Tuesday September 17, 2024 @08:06AM
(#41566787)
Renderers can access Node APIs via the ‘node integration’ setting or via a preload script.
Re:Show HN: Electrico – Electron Without Node and Chrome (Ru...
by themoonisachees on Tuesday September 17, 2024 @11:36AM
(#41568774)
Aren't these just IPCs disguised as normal function calls though? IIRC only the main node process does anything node, renderers can call "node functions" that really happen in the main process.
Re:Show HN: Electrico – Electron Without Node and Chrome (Ru...
by killcoder on Wednesday September 18, 2024 @05:48AM
(#41577736)
Not at all, in a renderer the Node and Chromium event loops are bound together, they’re part of the same v8 isolate, no IPC shenanigans.
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...
I don't think renderer processes run Node. Per the documentation,
https://www.electronjs.org/docs/latest/tutorial/process-mode...