Each platform has it's own webview control available as a shared library installed with the OS.<p>MacOS has WKWebKit based on WebKit.<p>Windows has WebView2 based on Edge/Chromium.<p>Linux has webkit2gtk based on WebKit.<p>Tools like Tauri use a simple cross-platform single-header abstraction called webview.h[1].<p>Electron no longer allows Node.js to be called from renderer processes, all communication with Node.js is done via IPC.<p>In this case, why do we still need Electron? Why does it have to be tied to V8/Node.js?<p>The fact that Chromium Embedded Framework exists and is third-party makes me think that Chromium wasn't designed for being embedded, and Electron is filling that gap.<p>This is elucidated here further here https://trac.webkit.org/wiki/WebKit2:<p>> it's difficult to reuse their work...if another WebKit-based application or another port wanted to do multiprocess based on Chromium WebKit, it would be necessary to reinvent or cut & paste a great deal of code.<p>It makes me think that perhaps WebKit was the better choice for embedding. The fact that Node used V8 made Chromium the choice, and that Node being called from the renderer was the original way of working. Maybe because WebKit didn't have a build for Windows was an issue too...<p>But now that we have Bun, perhaps it's time that WebKit becomes that browser target of choice for desktop apps on macOS.<p>Unless WebView2 for macOS arrives, which would have a more sane cross-platform story. WebView2 has a very large feature-set though which make take a while to implement for macOS.<p>[1]: https://github.com/webview/webview/blob/master/webview.h
While I don't have a strong preference for electron, I do have some thoughts and answers to your questions I'd like to share.<p>> Electron no longer allows Node.js to be called from renderer processes, all communication with Node.js is done via IPC.<p>I don't think calling Node.js from the renderer was a huge selling point for Electron - as it is not recommended due to security concerns. However, I still believe you can achieve this if you want - by using contextIsolation: false and nodeIntegration: true. But, even if this is not possible, it looks to me that using IPC with contextBridge still allows for pretty flexible Node.js use.<p>> Why does it have to be tied to V8/Node.js?<p>Some people prefer to have a Node.js backend (backend here being Electron's main Node.js process). There are multiple advantages to this:<p>- If using typescript: shared types between the frontend and backend<p>- Shared utilities, functions and constants<p>- If utilities and functions are shared, that means we can write some tests once, and the tests will work for both the backend and frontend<p>- Less context switching<p>These are just a few, I'm sure there are more.<p>> In this case, why do we still need Electron?<p>Besides the reasons I listed above, the alternative you listed (Tauri) seems to be relatively newer, have a smaller community, and with less online resources available (tutorials, stack overflow questions, etc).