3 ms·
People have tried, but the devs don't use it, because when you use an OS-provided WebView, you have to support way more browsers (and substantially older browse
by dfabulich 6y ago
People have tried, but the devs don't use it, because when you use an OS-provided WebView, you have to support way more browsers (and substantially older browsers) than you do if you just ship your own browser runtime.
On Windows, if you use an OS WebView, you'll have to support IE11 on Windows 7. On Windows 10, you'll get whatever random version of Edge was installed, or the new Chromium-based Edge.
On macOS, you'll have to support whatever version of Safari was installed on the user's Mac, which is better than IE11, but it could still be years out of date.
You might say, "Who cares? I have to support old browsers on my website, too" but this is way worse, forcing you to support browser versions you rarely see on the web. Windows 7 users typically just install the latest Chrome/Firefox and run that rather than surfing the web in IE11, but when you rely on the OS-bundled browser, all of your Win7 users will be on IE11. Your IE11 support can't be an "acceptable fallback"; it's the only/primary experience.
With Electron, you can ensure that your app will use Chromium; the exact version of Chromium you provided in your installer.
FWIW, Microsoft plans to ship a new "WebView 2" that will let you provide your own Chromium or depend on the latest Edge Chromium, with support all the way back to Windows 7. https://docs.microsoft.com/en-us/microsoft-edge/webview2/ https://docs.microsoft.com/en-us/microsoft-edge/webview2/
That's cool for Windows, but macOS is still just gonna give you whatever version of Safari the user has installed, and if you want Linux support, you really have no better option than to ship a browser runtime like Electron.
But, at that point, if you've shipped an Electron app for macOS and Linux, maybe you just wanna ship an Electron app for Windows and call it a day?