Electron 团队很高兴发布了 Electron 22.214.171.124！ You can install it with npm via
npm install electron@latest or download the tarballs from our releases page. 这次发布包含升级、修复和新功能。 We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!
Electron 5 also includes improvements to Electron-specific APIs. A summary of the major changes is below; for the full list of changes, check out the Electron v5.0.0 release notes.
Electron 5 continues Promisification initiative initiative to convert Electron's callback-based API to use Promises. These APIs were converted for Electron 5:
- Cookies API
System colors access for macOS
These functions were changed or added to
systemPreferences to access macOS systems' colors:
Process memory information
process.getProcessMemoryInfo has been added to get memory usage statistics about the current process.
Additional filtering for remote APIs
To improve security in the
remote API, new remote events have been added so that
<webview>.getWebContents can be filtered.
Multiple BrowserViews on BrowserWindow
BrowserWindow now supports managing multiple BrowserViews within the same BrowserWindow.
Defaults for packaged apps
Packaged apps will now behave the same as the default app: a default application menu will be created unless the app has one and the
window-all-closed event will be automatically handled unless the app handles the event.
Mixed sandbox mode is now enabled by default. Renderers launched with
sandbox: true will now be actually sandboxed, where previously they would only be sandboxed if mixed-sandbox mode was also enabled.
The default values of
webviewTag are now
false to improve security.
Spellchecker now asynchronous
The SpellCheck API has been changed to provide asynchronous results.
The following APIs are newly deprecated in Electron 5.0.0 and planned for removal in 6.0.0:
Mksnapshot binaries for arm and arm64
mksnapshot 用于武器和arm64 的本机二进制二进制已废弃，将在6秒后移除。 .0 可以使用 x64 二进制程序为手臂和arm64 创建快照。
ServiceWorker APIs on WebContents
Deprecated ServiceWorker APIs on WebContents in preparation for their removal.
Automatic modules with sandboxed webContents
In order to improve security, the following modules are being deprecated for use directly via
require and will instead need to be included via
remote.require in a sandboxed webcontents:
webFrame Isolated World APIs
webFrame.setIsolatedWorldSecurityOrigin have been deprecated in favor of
enableMixedSandbox and the
--enable-mixed-sandbox command-line switch still exist for compatibility, but are deprecated and have no effect.
End of support for 2.0.x
Per our supported versions policy, 2.0.x has reached end of life.
We continue to use our App Feedback Program for testing. Projects who participate in this program test Electron betas on their apps; and in return, the new bugs they find are prioritized for the stable release. If you'd like to participate or learn more, check out our blog post about the program.
In the short term, you can expect the team to continue to focus on keeping up with the development of the major components that make up Electron, including Chromium, Node, and V8. Although we are careful not to make promises about release dates, our plan is release new major versions of Electron with new versions of those components approximately quarterly. 暂定 6.0.0 时间表 展示了 Electron 6 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.
For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.