Hacker News new | ask | show | jobs
by JSDave 3378 days ago
Electron gives you a view process, background process, and a way for the 2 to communicate.

The view process is very limited, just standard web APIs.

The background process is basically a node process and can do anything you can in node.

2 comments

Including, importantly, the ability to fork+exec other native processes. You can ship an Electron client app that spawns and then interacts with a native C background service, if you like. (I believe that's how Keybase's native client works, in fact.)
> The view process is very limited, just standard web APIs.

Nitpicking here, but the view (rendering) process in Electron can actually use the Node API [1]. The difference in API access privilege between the two types of process is in what Electron API (not Node API) they can use. For example, main process can use native GUI API but renderers can't and must IPC to main if they need to, say, show a system dialog.

[1] https://github.com/electron/electron/blob/master/docs/glossa...