Wiredelta

The Latest Updates for Electron 4 and 5

Recently, we introduced you to the Electron framework and the 10 most popular Electron apps. As we mentioned back then Electron is an open source framework allowing developers to build cross-platform apps. And even though there are some developers that are not so keen on using it, Electron is by far the best framework to build cross-platform applications for desktop. Especially, if you know how and what to use it for. Furthermore, it is becoming stronger and better with the new updates for Electron 4 and 5.

 

What’s new with Electron 4?

A long list of Electron’s features is dependent on updates from Chromium, Node.js, and V8 as they work as its core components. Because of that, it is very important for the Electron framework to keep up with their updates and adopt these update to Electron respectively. In this way, developers using Electron for their projects are able to use the new web and JavaScript features. That’s why, the new Electron 4 is updated to Chromium 69.0.3497.106, Node 10.11.0, and V8 6.9.427.24. In addition, some Electron-specific APIs in Electron 4 have also changed.

 

With Electron 4, developers can disable remote module. That is the mechanism to access main process modules for BrowserWindow and webview tags. By doing that, developers have an extra level of control over application security. Furthermore, if developers don’t want to disable the remote module completely, but still want to have control over the required modules, they can use the filter function, remote.require.

 

In addition, Electron 4 WebContents instances include a new method, setBackgroundThrottling(allowed). That is for enabling or disabling throttling of timers and animations when a page runs in the background. Most importantly, Chromium no longer supports macOS 10.9 (OS X Mavericks). This means, that Electron 4.0 and its future updates don’t support it, as well.

 

What’s new with Electron 5?

V5.0.0 of Electron arrived on the 23rd of April this year. It came with some updates for Chromium, Node.js and V8, it’s core elements. These updates will, of course, resolve issues and add some new features as well as breaking changes. As these changes also update the aftermentioned elements to their newest versions, you can expect improved security and more efficient Javascript performance. For more information on Chromium updates, watch the video below.

 

The major changes
  • Package app will work like default apps: Default application menus will be generated and the window-all-closed event will be automatically handled unless the app handles these features itself.
  • Sandbox: true now actually sandboxes renderers as mixed-sandbox mode will be active by default. Previously this had to be manually activated.
  • NodeIntegration and webviewTag are now false default values for better security.
  • Asynchronous results are now to be provided by the SpellCheck API.

 

New features
  • Multiple BrowserViews can now be seen in the same BrowserWindow.
  • In Electron 5, Promises will be returned by the callback-based functions that are called “Electron’s Promisification initiative”. Both the callback and Promise-based versions of these functions will work correctly, and will both be documented during this transition period.
  • To enable access to MacOS system colours, three changes and additions to systemPreferences were executed. Namely, systemPreferences.getAccentColor, systemPreferences.getColor, and systemPreferences.getSystemColor.
  • Now memory usage statistics regarding current statistics processes can be obtained thanks to the introduction of process.getProcessMemoryInfo function.
  • Remote.getBuiltin, remote.getCurrentWindow, remote.getCurrentWebContents and .getWebContents can be filtered as part of the introduction of new remote events, which were added to improved security in the remote API.

 

Deprecated APIs

Electron 5.0.0 saw the deprecation of three APIs, which are planned for removal in Electron 6: Namely, Mksnapshot binaries for arm and arm64, ServiceWorker APIs on WebContents, and Automatic modules with sandboxed webContents.

What’s next, Electron 6?

Electron 6 is due on the 30th of July and numerous improvements are already in progression as demonstrated in the Electron release summary.  This states that this new version will include Chromium M76 and Node V12.0. In addition, Electron’s App Feedback Programme is allowing developers to conduct early testing and give feedback during the beta release cycle.

 

For the 3.0 release, Electron has given their gratitude to Atlassian, Atom, Microsoft Teams, Oculus, OpenFin, Slack, Symphony, VS Code among others for their help.

 

Conclusion 

Electron is clearly working hard to keep providing developers with the best framework to build desktop applications with web technologies. Despite being snubbed by some developers, this powerful framework has much to offer. Developers do not need a particularly powerful machine and it can be used on most platforms.

 

It will be interesting to see where its continuous improvements and update will lead it. Here at Wiredelta, we will be sure to keep you up to date on this and other frameworks, so why not join our newsletter to make sure you never will miss out. If you have a project that would require Electron or any other framework, why not reach out to us and see what our team can do.

 

Success stories

In the past decade we have launched over 100 websites and more than 20 mobile apps, helping each of our client get closer to their digital goals.

Executive Global
Network

Connecting executives around the world in one of the largest professional networks

Philip Morris
International

Working together towards a smoke-free future for the Nordics.

Ønskeskyen
(GoWish)

Denmark’s largest wish cloud is going global with a brand new look and a lot of new features

How can we bring you value?