跳转到主内容

· 阅读时间:约 5 分钟

Electron 10.0.0 已发布! 它包括升级到 Chromium 85, V8 8.5, 和 Node.js 12.16。 我们添加了几个新的 API 集成和改进。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 10.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。

在 Electron 10 发布版中,我们还修改了我们的版本说明。 To make it easier to tell what's brand new in Electron 10 and what may have changed between Electron 10 and past releases, we now also include changes that were introduced to Electron 10, but backported to previous releases. We hope this makes it easier to apps to find new features and bug fixes when upgrading Electron.

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!

重要变化

架构(Stack)更新

Highlight Features

  • Added contents.getBackgroundThrottling() method and contents.backgroundThrottling property. [#21036]
  • Exposed the desktopCapturer module in the main process. #23548
  • Can now check if a given session is persistent by calling the ses.isPersistent() API. #22622
  • Resolve network issues that prevented RTC calls from being connected due to network IP address changes and ICE. (Chromium issue 1113227). #24998

有关新功能和变更的完整列表,请参阅 10.0.0 发布通知

重大更改

  • Changed the default value of enableRemoteModule to false. #22091
    • This is part of our plans for deprecating the remote module and moving it to userland. You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.
  • Changed the default value of app.allowRendererProcessReuse to true. #22336 (Also in Electron 9)
    • This will prevent loading of non-context-aware native modules in renderer processes.
    • You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.
  • Fixed the positioning of window buttons on macOS when the OS locale is set to an RTL language (like Arabic or Hebrew). Frameless window apps may have to account for this change while styling their windows. #22016

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • Session: Can now check if a given session is persistent by calling the ses.isPersistent() API. #22622
  • Contents: Added contents.getBackgroundThrottling() method and contents.backgroundThrottling property. #21036

Deprecated APIs

The following APIs are now deprecated or removed:

  • Removed the deprecated currentlyLoggingPath property of netLog. Additionally, netLog.stopLogging no longer returns the path to the recorded log. #22732
  • Deprecated uncompressed crash uploads in crashReporter. #23598

终止对 7.x.y 的支持

根据项目的支持政策,Electron 7.x.y 已经达到了支持的终点。 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 11.0.0 时间表 展示了 Electron 11.0 开发生命周期中的关键日期。 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.

Continued Work for Deprecation of remote Module (in Electron 11)

We started work to remove the remote module in Electron 9 and we're continuing plans to remove the remote module. In Electron 11, we plan to continue refactor work for implementing WeakRef as we have done in Electron 10. Please read and follow this issue for full plans and details for deprecation.

Final Step for Requiring Native Node Modules to be Context Aware or N-API (in Electron 12)

Edit: Originally, this blog post stated that we would disable renderer process reuse in Electron 11. Disabling renderer process reuse has now been pushed to Electron 12.

From Electron 6 onwards, we've been laying the groundwork to require native Node modules loaded in the renderer process to be either N-API or Context Aware. Enforcing this change allows for stronger security, faster performance, and reduced maintenance workload. The final step of this plan is to remove the ability to disable render process reuse in Electron 12. Read this issue for full details including the proposed timeline.

· 阅读时间:约 1 分钟

At OpenJS World this morning, we announced that Electron has officially graduated from the OpenJS Foundation's incubation program, and is now an OpenJS Foundation Impact Project.

Electron entered incubation in December of 2019, at the last OpenJS Foundation global conference in Montreal. We're excited to take a larger role in the JavaScript community as an Impact Project, and continue our partnership with the OpenJS Foundation.


Learning more

You can read up on the foundation, its mission, and its members on the OpenJSF website. The OpenJS Foundation is host to a number of open source JavaScript projects including jQuery, Node.js, and webpack. It's supported by 30 corporate and end-user members, including GoDaddy, Google, IBM, Intel, Joyent, and Microsoft.

Electron is an open–source framework for building cross-platform desktop applications with web technologies. To learn more about the humans behind Electron and how they work together, take a look at our Governance page.

To get started with Electron itself, take a peek at our documentation.

· 阅读时间:约 3 分钟

Electron is proud to be participating in the second edition of Google's Season of Docs initiative, which pairs mentors from open source organizations with technical writers to improve project documentation.


什么是文档之季?

文档之季标志

文档之季是一个为促进技术作者与开源社区间合作而生的计划。 开源软件维护者利用作家们的技术写作专家知识来改进其文档的结构和内容。同时,技术作家在导师指导下被介绍给开源社区。 在Google的 文档之季网站 上了解更多信息。

这是我们第一次参加这项计划,我们将会指导一位将与生态项目组合作的技术作家,以大规模重塑我们的记录文档。 您可以在这里了解更多关于整个工程的时间线

我该如何参加?

您是否有兴趣作为技术撰稿人与我们合作? 首先,请了解谷歌今年的技术写作指南 。并查看我们编写的两个 项目构想草案

为了被选为 Electron 的 Season of Docs 技术撰稿人,参与者需要在 6 月 8 日至 7 月 9 日的技术撰稿人申请阶段在 Google Season of Docs 网站上申请。

您的申请应包括一份提案,这是一份书面文件,详细描述了您计划在3个月内在Electron文档上实现的目标。 该提案可以在我们的 “项目构想” (Project Idea) 文档中提到的起点之一上进行开发,也可以是全新的东西。 不知道从哪里开始? 您可以查看去年已接受的提案列表,以获取灵感。

除了提案之外,我们还将研究您作为技术作家的背景。 请附上您的简历副本,重点是相关的写作经验,以及技术写作样本(这些样本可能是现有的文档,教程,博客文章等)。

如果您想讨论项目提案,请在 season-of-docs@electronjs.org 上给我们发送电子邮件,我们可以从那里聊天!

引用

· 阅读时间:约 5 分钟

Electron 9.0.0 已发布! 它包括升级到 Chromium 83, V8 8.3, 和 Node.js 12.14。 We've added several new API integrations for our spellchecker feature, enabled PDF viewer, and much more!


Electron 团队很高兴发布了 Electron 9.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 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!

重要变化

架构(Stack)更新

Highlight Features

  • Multiple improvements to the spellchecker feature. See more details in #22128 and #22368.
  • Improved window events handler efficiency on Linux. #23260.
  • Enable PDF viewer. #22131.

有关新功能和变更的完整列表,请参阅 9.0.0 发布通知

重大更改

  • Deprecation warning when using remote without enableRemoteModule: true. #21546
    • This is the first step in our plans for deprecating the remote module and moving it to userland. You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.
  • Set app.enableRendererProcessReuse to true by default. #22336
    • This is continued work for a future requirement that native Node modules loaded in the renderer process be either N-API or Context Aware. Full info and proposed timeline is detailed in this issue.
  • Sending non-JavaScript objects over IPC now throws an exception. #21560
    • This behavior was depreciated in Electron 8.0. In Electron 9.0, the old serialization algorithm has been removed, and sending such non-serializable objects will now throw an "object could not be cloned" error.

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • shell API changes:
    • The shell.openItem API has been replaced with an asynchronous shell.openPath API. proposal
  • sessionAPI changes:
    • Added session.listWordsFromSpellCheckerDictionary API to list custom words in the dictionary. #22128
    • Added session.removeWordFromSpellCheckerDictionary API to remove custom words in the dictionary. #22368
    • Added session.serviceWorkerContext API to access basic service worker info and receive console logs from service workers. #22313
  • app API changes:
    • Added a new force parameter to app.focus() on macOS to allow apps to forcefully take focus. #23447
  • BrowserWindow API changes:
    • Added support for property access to some getter/setter pairs on BrowserWindow. #23208

Deprecated APIs

The following APIs are now deprecated or removed:

  • shell.openItem API is now depreciated, and replaced with an asynchronous shell.openPath API.
  • <webview>.getWebContents, which was deprecated in Electron 8.0, is now removed.
  • webFrame.setLayoutZoomLevelLimits, which was deprecated in Electron 8.0, is now removed.

终止对 6.x.y 的支持

Electron 6.x.y has reached end-of-support as per the project's support policy. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 10.0.0 时间表 展示了 Electron 10.0 开发生命周期中的关键日期。 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.

Change the default of contextIsolation from false to true (Starting in Electron 10)

Without contextIsolation, any code running in a renderer process can quite easily reach into Electron internals or an app's preload script. That code can then perform privileged actions that Electron wants to keep restricted.

Changing this default improves the default security of Electron apps, so that apps will need to deliberately opt in to the insecure behaviour. Electron will depreciate the current default of contextIsolation in Electron 10.0, and change to the new default (true) in Electron 12.0.

For more information on contextIsolation, how to enable it easily and it's security benefits please see our dedicated Context Isolation Document.

· 阅读时间:约 2 分钟

Electron 正在暂停更新大型版本


发生了什么?

我们的 大型更新时间表 与Chromium 同步更新,Chromium项目最近由于调整工作时间表已决定 暂停更新。 这意味着,在Chromium经过改变的更新节奏期间,Electron也会暂时性地暂停重大更新。

我们认为,我们的最佳选择是沿着Chromium的脚步走下去, 因此,在过渡时期,Electron团队将转为全天候处理错误、安全、性能和稳定性问题。

我们希望确保我们的维护者和消费者的福利在这个时候都得到优先考虑。 因此,我们欢迎你们的反馈,并期待着恢复我们的正常发布时间表。

欲了解更多更新信息,请关注我们的 Twitter

编辑(2020-03-30):Election 9 稳定版将针对Chromium M83,并于2020年5月19日发布。 这针对 Chromium的声明 关于跳过M82稳定日期并调整M83稳定版发布日期。

· 阅读时间:约 6 分钟

Electron 8.0.0 已发布! 它包括升级到 Chromium 80, V8 8.0, 和 Node.js 12.13.0。 We've added Chrome's built-in spellchecker, and much more!


Electron 团队很高兴发布了 Electron 8.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 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!

重要变化

架构(Stack)更新

Highlight Features

  • Implemented usage of Chrome's built-in spellchecker feature. See more details in #20692 and #21266.
  • IPC communication now uses v8's Structured Clone Algorithm. This is faster, more featureful, and less surprising than the existing logic, and brings about a 2x performance boost for large buffers and complex objects. Latency for small messages is not significantly affected. See more details in #20214.

有关新功能和变更的完整列表,请参阅 8.0.0 发布通知

重大更改

  • Show module name in deprecation warning for context-aware modules. #21952
    • This is continued work for a future requirement that native Node modules loaded in the renderer process be either N-API or Context Aware. Full info and proposed timeline is detailed in this issue.
  • Values sent over IPC are now serialized with Structured Clone Algorithm. #20214
  • Offscreen Rendering is currently disabled due to lack of a maintainer to work on this feature. It broke during the Chromium upgrade and was subsequently disabled. #20772

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • app API changes:
    • 已添加 app.getApplicationNameForProtocol(url)#20399
    • Added app.showAboutPanel() and app.setAboutPanelOptions(options) support on Windows. #19420
  • BrowserWindow API changes:
    • Updated docs to note that BrowserWindow options hasShadow is available on all platforms #20038
    • Added trafficLightPosition option to BrowserWindow options to allow custom positioning for traffic light buttons. #21781
    • Added accessibleTitle option to BrowserWindow for setting the accessible window title #19698
    • BrowserWindow.fromWebContents() can now return null #19983
    • Added BrowserWindow.getMediaSourceId() and BrowserWindow.moveAbove(mediaSourceId). #18926
    • Added support for will-move event on macOS. #19641
  • Documented previously undocumented crashReporter.getCrashesDirectory(). #20417
  • dialog API changes:
    • Added dontAddToRecent property to dialog.showOpenDialog and dialog.showOpenDialogSync to prevent documents from being added to recent documents on Windows in open dialogs. #19669
    • Added property customization to dialog.showSaveDialog and dialog.showSaveDialogSync. #19672
  • Notification API changes:
    • Added timeoutType option to allow Linux/Windows users to set the type of notification timeout. #20153
    • Added urgency option to set urgency on Linux notifications. #20152
  • session API changes:
    • Updated documentation on session.setProxy(config) and session.setCertificateVerifyProc(proc) to note optional options. #19604
    • Added session.downloadURL(url) to allow to triggering downloads without a BrowserWindow. #19889
    • Added support for HTTP preconnect resource hints via session.preconnect(options) and the preconnect event. #18671
    • Added session.addWordToSpellCheckerDictionary to allow custom words in the dictionary #21297
  • Added option to shell.moveItemToTrash(fullPath[, deleteOnFail]) on macOS to specify what happens when moveItemToTrash fails. #19700
  • systemPreferences API changes:
    • Updated systemPreferences.getColor(color) documentation for macOS. #20611
    • Added screen media type to systemPreferences.getMediaAccessStatus(). #20764
  • Added nativeTheme.themeSource to allow apps to override Chromium and the OS's theme choice. #19960
  • TouchBar API changes:
    • Added accessibilityLabel property to TouchBarButton and TouchBarLabel to improve TouchBarButton/TouchBarLabel accessibility. #20454
    • Updated TouchBar related documentation #19444
  • tray API changes:
    • Added new options to tray.displayBalloon(): iconType, largeIcon, noSound and respectQuietTime. #19544
    • Added tray.removeBalloon(), which removes an already displayed balloon notification. #19547
    • Added tray.focus(), which returns focus to the taskbar notification area. feat: add tray.focus() #19548
  • webContents API changes:
    • Added contents.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture]) to expose executeJavaScriptInIsolatedWorld on the webContents API. #21190
    • Added methods to capture a hidden webContents. #21679
    • Added options to webContents.print([options], [callback]) to enable customization of print page headers and footers. #19688
    • Added ability to inspect specific shared workers via webContents.getAllSharedWorkers() and webContents.inspectSharedWorkerById(workerId). #20389
    • Added the support of fitToPageEnabled and scaleFactor options in WebContents.printToPDF(). #20436
  • Updated webview.printToPDF documentation to indicate return type is now Uint8Array. #20505

Deprecated APIs

The following APIs are now deprecated:

  • Deprecated the nonfunctional visibleOnFullScreen option within BrowserWindow.setVisibleOnAllWorkspaces prior to its removal in the next major release version. #21732
  • Deprecated alternate-selected-control-text on systemPreferences.getColor(color) for macOS. #20611
  • Deprecated setLayoutZoomLevelLimits on webContents, webFrame, and <webview> Tag because Chromium removed this capability. #21296
  • The default value of false for app.allowRendererProcessReuse is now deprecated. #21287
  • Deprecated <webview>.getWebContents() as it depends on the remote module. #20726

终止对 5.x.y 的支持

Electron 5.x.y has reached end-of-support as per the project's support policy. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

应用反馈项目

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.

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 9.0.0 时间表 展示了 Electron 9 开发生命周期中的关键日期。 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.

Deprecation of remote Module (Starting in Electron 9)

Due to serious security liabilities, we are beginning plans to deprecate the remote module starting in Electron 9. You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.

· 阅读时间:约 2 分钟

At Node+JS Interactive in Montreal, the OpenJS Foundation announced that it accepted Electron into the Foundation's incubation program. The Foundation is committed to supporting the healthy growth of the JavaScript ecosystem and web technologies by providing a neutral organization to host and sustain projects, as well as collaboratively fund activities for the benefit of the community at large.

The OpenJS Foundation is host to a number of open source JavaScript projects including jQuery, Node.js, and webpack. It's supported by 30 corporate and end-user members, including GoDaddy, Google, IBM, Intel, Joyent, and Microsoft. Electron is an open–source framework for building cross-platform desktop applications with web technologies.

This is an exciting move for Electron, and we see it as a next step in our evolution as an open-source project.


What this means for developers

Electron joining the OpenJS Foundation does not change how Electron is made, released, or used — and does not directly affect developers building applications with Electron. Even though Electron was originally created at GitHub in 2013, it is currently maintained by a number of organizations and individuals. In 2019, Electron codified its governance structure and invested heavily into formalizing how decisions affecting the entire project are made. We believe that having multiple organizations and developers investing in and collaborating on Electron makes the project stronger.

Lifting Electron up from being owned by a single corporate entity and moving it into a neutral foundation focused on supporting the web and JavaScript ecosystem is a natural next step as we mature as an open-source project.

Learning more

You can read up on the foundation, its mission, and its members on the OpenJSF website. For more information and quotes about the acceptance of Electron into the OpenJSF incubation program, check out the official press release. To learn more about the humans behind Electron and how they work together, take a look at our Governance page.

To get started with Electron itself, take a peek at our documentation.

· 阅读时间:约 2 分钟

A High severity vulnerability has been discovered in Chrome which affects all software based on Chromium, including Electron.

此漏洞已被分配 CVE-2019-13720。 您可以在 Chrome 博客文章 中阅读更多关于它的信息。

请注意,Chrome将这个漏洞报告为已经被利用,因此强烈建议您尽快升级 Electron


作用域

This affects any Electron application that may run third-party or untrusted JavaScript.

Mitigation

Affected apps should upgrade to a patched version of Electron.

We've published new versions of Electron which include fixes for this vulnerability:

Electron 7.0.1 在发布通知之前已自动包含了上游的修复。 Electron 8同样不受影响。 该漏洞在Electron 5中不存在,因此该版本也不受影响。

Further Information

此漏洞由卡巴斯基实验室的 Anton Ivanov 和 Alexey Kulaev 发现,并报告给 Chrome 团队。 Chrome博客文章可以在这里找到

要了解更多关于维护您的 Electron 应用安全的最佳做法,请参阅我们的 安全教程

If you wish to report a vulnerability in Electron, email security@electronjs.org.

· 阅读时间:约 4 分钟

Electron 7.0.0 已发布! 它包括升级Chromium 78, V8 7.8和Node.js 12.8.1。 我们已经添加了一个窗口到Arm 64版本,更快的 IPC 方法,一个新的 本地主题 API,还有更多!


Electron 团队很高兴发布了 Electron 7.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 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!

重要变化

  • Stack Upgrades:

    StackVersion in Electron 6Version in Electron 7What's New
    Chromium76.0.3809.14678.0.3905.177, 78
    V87.67.87.7, 7.8
    Node.js12.4.012.8.112.5, 12.6, 12.7, 12.8, 12.8.1
  • Added Windows on Arm (64 bit) release. #18591, #20112

  • Added ipcRenderer.invoke() and ipcMain.handle() for asynchronous request/response-style IPC. These are strongly recommended over the remote module. See this "Electron’s ‘remote’ module considered harmful" blog post for more information. #18449

  • Added nativeTheme API to read and respond to changes in the OS's theme and color scheme. #19758, #20486

  • Switched to a new TypeScript Definitions generator. The resulting definitions are more precise; so if your TypeScript build fails, this is the likely cause. #18103

See the 7.0.0 release notes for a longer list of changes.

重大更改

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

  • Removed deprecated APIs:
    • Callback-based versions of functions that now use Promises. #17907
    • Tray.setHighlightMode() (macOS). #18981
    • app.enableMixedSandbox() #17894
    • app.getApplicationMenu(),
    • app.setApplicationMenu(),
    • powerMonitor.querySystemIdleState(),
    • powerMonitor.querySystemIdleTime(),
    • webFrame.setIsolatedWorldContentSecurityPolicy(),
    • webFrame.setIsolatedWorldHumanReadableName(),
    • webFrame.setIsolatedWorldSecurityOrigin() #18159
  • Session.clearAuthCache() no longer allows filtering the cleared cache entries. #17970
  • Native interfaces on macOS (menus, dialogs, etc.) now automatically match the dark mode setting on the user's machine. #19226
  • Updated the electron module to use @electron/get. The minimum supported node version is now Node 8. #18413
  • The file electron.asar no longer exists. Any packaging scripts that depend on its existence should be updated. #18577

终止对 4.x.y 的支持

Electron 4.x.y has reached end-of-support as per the project's support policy. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

应用反馈项目

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.

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 8.0.0 时间表 展示了 Electron 8 开发生命周期中的关键日期。 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.

· 阅读时间:约 5 分钟

Electron 团队很高兴发布了 Electron 6.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 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!


What's New

Today marks a first for the Electron project: this is the first time we've made a stable Electron release on the same day as the corresponding Chrome stable release! 🎉

Much of Electron's functionality is provided by the core components of Chromium, Node.js, and V8. Electron keeps up-to-date with these projects to provide our users with new JavaScript features, performance improvements, and security fixes. Each of these packages has a major version bump in Electron 6:

This release also includes improvements to Electron's APIs. The release notes have a more complete list, but here are the highlights:

Promisification

Electron 6.0 continues the modernization initiative started in 5.0 to improve Promise support.

These functions now return Promises and still support older callback-based invocation:

  • contentTracing.getCategories() #16583
  • contentTracing.getCategories() #16583
  • contentTracking.getTraceBufferUs() #16600
  • contents.executeJavaScript() #17312
  • cookies.flushStore() #16464
  • cookies.get() #16464
  • cookies.remove() #16464
  • cookies.set() #16464
  • dialog.showCertificateTrustDialog() #17181
  • inAppPurchase.getProducts() #17355
  • inAppPurchase.purchaseProduct()#17355
  • netLog.stopLogging() #16862
  • session.clearAuthCache() #17259
  • session.clearCache() #17185
  • session.clearHostResolverCache() #17229
  • session.clearStorageData() #17249
  • session.getBlobData() #17303
  • session.getCacheSize() #17185
  • session.resolveProxy() #17222
  • session.setProxy() #17222
  • webContents.hasServiceWorker() #16535
  • webContents.printToPDF() #16795
  • webContents.savePage() #16742
  • webFrame.executeJavaScript() #17312
  • webFrame.executeJavaScriptInIsolatedWorld() #17312
  • webviewTag.executeJavaScript() #17312

这些功能现在有两种形式,即同步和基于Promise的异步:

  • dialog.showMessageBox()/dialog.showMessageBoxSync() #17298
  • dialog.showOpenDialog()/dialog.showOpenDialogSync() #16973
  • dialog.showSaveDialog()/dialog.showSaveDialogSync() #17054

These functions now return Promises:

Electron Helper (Renderer).app, Electron Helper (GPU).app and Electron Helper (Plugin).app

In order to enable the hardened runtime, which restricts things like writable-executable memory and loading code signed by a different Team ID, special code signing entitlements needed to be granted to the Helper.

To keep these entitlements scoped to the process types that require them, Chromium added three new variants of the Helper app: one for renderers (Electron Helper (Renderer).app), one for the GPU process (Electron Helper (GPU).app) and one for plugins (Electron Helper (Plugin).app).

Folks using electron-osx-sign to codesign their Electron app shouldn't have to make any changes to their build logic. If you're codesigning your app with custom scripts, you should ensure that the three new Helper applications are correctly codesigned.

In order to package your application correctly with these new helpers you need to be using electron-packager@14.0.4 or higher. If you are using electron-builder you should follow this issue to track support for these new helpers.

重大更改

  • This release begins laying the groundwork for a future requirement that native Node modules loaded in the renderer process be either N-API or Context Aware. The reasons for this change are faster performance, stronger security, and reduced maintenance workload. Read the full details including the proposed timeline in this issue. This change is expected to be completed in Electron v11.

  • net.IncomingMessage headers have changed slightly to more closely match Node.js behavior, particularly with the value of set-cookie and how duplicate headers are handled. #17517.

  • shell.showItemInFolder() now returns void and is an asynchronous call. #17121

  • Apps must now explicitly set a log path by calling the new function app.setAppLogPath() before using app.getPath('log'). #17841

终止对 3.x.y 的支持

Per our support policy, 3.x.y has reached end of life. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

应用反馈项目

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.

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 7.0.0 时间表 展示了 Electron 7 开发生命周期中的关键日期。 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.