BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Electron 4 and 5 Releases Add Security and Modern Web APIs

Electron 4 and 5 Releases Add Security and Modern Web APIs

This item in japanese

The Electron team recently announced the release of version 4 and version 5 of Electron. Electron maintains an aggressive release cycle to stay current with the latest updates from Chromium, V8, and Node.js. Significant updates in these versions include better control over remotes and requests, and an in-progress initiative to update Electron's callback-based APIs to use promises.

Electron aims to provide a rapidly stabilizing and improved platform for building desktop apps with Node.js, Chrome, and other modern web development APIs. Electron 4 updates its major dependencies to Chromium version 73.0.3683.119, Node.js version 12.0.0, and V8 JavaScript engine version 7.3.492.27.

Many of Electron's APIs were created before ECMAScript standardized promises. The ongoing initiative to move Electron's callback-based APIs to leverage promises is well underway, and covers a wide range of electron features from tracing to cookies.

To provide developers with an additional level of control over application security, Electron 4 adds the ability to disable the remote module, the mechanism to access main process modules from the renderer process, for BrowserWindow and webview tags.

Electron 4 also adds the ability to filter remote.require() / remote.getGlobal() requests for use cases when applications do not want to disable the remote module altogether, but seek additional control over which modules can get required via remote.require.

Version 5 extends this additional remote filtering control by introducing new remote events to allow remote.getBuiltin, remote.getCurrentWindow, remote.getCurrentWebContents and <webview>.getWebContents to also be filterable.

Electron 4 WebContents instances include a new method, setBackgroundThrottling(allowed), for enabling or disabling throttling of timers and animations when a page gets moved to the background.

Version 5 of Electron includes a new process.getProcessMemoryInfo function to get memory usage statistics about the current process. Additionally, the BrowserWindow supports the management of multiple BrowserViews within a single BrowserWindow.

Complete lists of breaking changes and bug fixes in Electron 4 and 5 are available in release notes:

Additionally, with the updates to the Chromium, V8, and Node.js dependencies, numerous additional JavaScript and web standards improvements are now part of Electron. Highlights of recent changes are available in the relevant release notes:

Numerous improvements are already underway for Electron 6 and progress may be viewed with the Electron releases summary. With this and future releases, Electron continues to improve on its powerful platform for building desktop applications with web technologies.

Electron also has an App Feedback Program to allow developers to provide early testing and feedback during the beta release cycle. For the 3.0 release, the Electron team thanks Atlassian, Atom, Microsoft Teams, Oculus, OpenFin, Slack, Symphony, VS Code, and other program members for their assistance.

Electron is available via the MIT open source license. Contributions are welcome via the Electron GitHub organization and should follow Electron's contribution guidelines and code of conduct.

Rate this Article

Adoption
Style

BT