Electron 9 helps apps to step into macOS users’ focus

Electron 9 helps apps to step into macOS users’ focus

Electron, a framework for writing desktop applications using JavaScript, HTML and CSS, just celebrated its 9th major release. The project is largely based on Chromium and Node.js and can be found in well-known applications such as the Atom editor, Microsoft Teams, and streaming platform Twitch.

In its most recent iteration, Electron comes with a PDF viewer enabled and some improvements to its spellchecker, allowing users to list and remove custom words from a dictionary. On a deeper level, users are now able to access basic service worker info and receive their console logs via a newly added session.serviceWorkerContext API.

Since apps built with Electron should run across platforms and offer a similar look and feel everywhere, the team also added a force parameter to app.focus() that can help an application to get into the focus on macOS. Meanwhile some improvements under the hood are meant to let the window event handler use less resources on Linux systems.

Users should be aware that app.allowRendererProcessReuse is now set to true to prevent loading of non-context aware native modules in renderer processes, which had caused some pain in the past. 

Other breaking changes include a reworking of shell.openItem(path) leading to a split into synchronous and asynchronous methods, and the removal of <webview>.getWebContents() and setLayoutZoomLevelLimits, which had been deprecated before. More details can be found in the project repository.

The next major release is currently planned for August 2020, coinciding with version 85 of Chromium. Electron 10 will see the deprecation of some crashReporter methods and enableRemoteModule becoming disabled by default. Other than that, the focus will be on keeping up with the changes in the major components of the framework and slight security improvements.