Skip to main content

社区 Discord 服务器和 Hacktoberfest

· 6 min read

加入我们,共同构建社区,并参与为期一个月的开源庆祝活动。

¥Join us for community bonding and a month-long celebration of open-source.


Hacktoberfest and Discord banner

Electron 社区 Discord 发布

¥Electron Community Discord Launch

Electron 的 外联工作组 很高兴地宣布我们官方社区 Discord 服务器现已上线!

¥Electron’s Outreach Working Group is excited to announce the launch of our official community Discord server!

为什么要建立新的 Discord 服务器?

¥Why a new Discord server?

在 Electron 作为 Atom 文本编辑器 主干的早期,社区对 Electron 框架的讨论主要集中在 Atom 的 Slack 工作区中的一个通道。随着时间的推移,两个项目之间的耦合度逐渐降低,Atom 工作区与 Electron 项目的相关性逐渐降低,维护者在 Slack 通道的参与度也随之下降。

¥In its early days as the backbone of the Atom text editor, community discussion on the Electron framework occurred in a single channel in Atom’s Slack workspace. As time passed and the two projects were increasingly decoupled, the relevance of the Atom workspace to the Electron project decreased, and maintainer participation in the Slack channel declined in the same manner.

到目前为止,我们仍然将更广泛的社区重定向到 Atom Slack 工作区,尽管我们收到了许多用户的报告,他们在接收邀请方面遇到了问题,而且我们的核心维护人员很少经常访问该通道。

¥Up until now, we had still been redirecting our broader community to the Atom Slack workspace, even though we’ve had many reports from folks who have had trouble receiving invitations, and few of our core maintainers were frequenting the channel.

我们正在搭建这个崭新的服务器,作为社区的中心讨论中心,你可以在这里获取关于 Electron 的最新消息。

¥We’re setting up this shiny new server to be a central discussion hub for the community where you can get the latest news on all things Electron.

快来加入吧!

¥Get in here!

到目前为止,服务器的成员由一些维护人员组成,他们一直在共同努力建立服务器,但我们非常高兴能与大家交流!欢迎寻求帮助,关注 Electron 的最新发布,或与其他开发者交流。我们有一个便捷的 邀请你加入,你可以访问服务器!

¥So far, the server’s membership consists of a few maintainers who have been working together to set it up, but we’re so excited to chat with you all! Come ask for help, keep up to date with Electron releases, or just hang out with other developers. We’ve got a handy invite for you that’ll give you access to the server!

2020 Hacktoberfest

作为一个大型且长期运行的开源项目,如果没有社区的贡献,从代码提交到错误报告,再到文档修改等等,Electron 不可能取得如此大的成功。正因如此,我们相信参加 Hacktoberfest 非常重要,因为它可以吸引更多不同技能水平的开发者加入到我们的项目中。

¥As a large and long-running open-source project, Electron wouldn’t have been nearly as successful without all the contributions from its community, from code submissions to bug reports to documentation changes, and much more. That’s why we believe in the importance of participating in Hacktoberfest to usher in a wider community of developers of all skill levels into the project.

其他信息

¥Odds and ends

今年,我们没有更广泛的项目可以提供给大家,但我们希望专注于为 Electron JavaScript 生态系统做出贡献的机会。

¥This year, we don’t have a wider project to give you all to work on, but we’d like to focus on opportunities to contribute across the Electron JavaScript ecosystem.

请留意我们各个代码库中标记为 hacktoberfest 的问题,包括主 electron/electron 代码库、electron/electronjs.org 网站、electron/fiddleelectron-userland/electron-forge

¥Look out for issues tagged hacktoberfest across our various repositories, including the main electron/electron repository, the electron/electronjs.org website, electron/fiddle, and electron-userland/electron-forge!

P.S.如果你特别喜欢冒险,我们也准备了一些带有 help wanted 标签的问题,如果你想要挑战更多挑战,可以参考。

¥P.S. If you're feeling particularly adventurous, we also have a backlog of issues marked with help wanted tags if you're looking for more of a challenge.

遇到问题?来和我们聊聊吧!

¥Stuck? Come chat with us!

此外,我们的 Discord 服务器盛大启用恰逢年度最大的开源软件庆典,这也绝非巧合。查看 #hacktoberfest 通道,为你的 Hacktoberfest PR 寻求帮助。如果你遗漏了,再次提供邀请链接

¥Moreover, it’s also no coincidence that the grand opening of our Discord server coincides with the largest celebration of open-source software of the year. Check out the #hacktoberfest channel to ask for help on your Hacktoberfest PR. In case you missed it, here's the invite link again!

Electron 10.0.0

· 11 min read

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

¥Electron 10.0.0 has been released! It includes upgrades to Chromium 85, V8 8.5, and Node.js 12.16. We've added several new API integrations and improvements. Read below for more details!


Electron 团队非常高兴地宣布 Electron 10.0.0 正式发布!你可以通过 npm install electron@latest 使用 npm 安装它,也可以从我们的 发布网站。此版本包含升级、修复和新功能。

¥The Electron team is excited to announce the release of Electron 10.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. The release is packed with upgrades, fixes, and new features.

在 Electron 10 版本中,我们还对发行说明进行了更改。为了更容易地了解 Electron 10 中的新功能以及 Electron 10 与过去版本之间可能发生的变化,我们现在还包含了 Electron 10 中引入但已反向移植到以前版本的更改。我们希望这能让应用在升级 Electron 时更容易找到新功能和错误修复。

¥In the Electron 10 release, we also made a change to our release notes. 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!

显著变化

¥Notable Changes

技术栈变更

¥Stack Changes

亮点功能

¥Highlight Features

  • 添加了 contents.getBackgroundThrottling() 方法和 contents.backgroundThrottling 属性。[#21036]

    ¥Added contents.getBackgroundThrottling() method and contents.backgroundThrottling property. [#21036]

  • 在主进程中暴露 desktopCapturer 模块。#23548

    ¥Exposed the desktopCapturer module in the main process. #23548

  • 现在可以通过调用 ses.isPersistent() API 检查给定的 session 是否持久化。#22622

    ¥Can now check if a given session is persistent by calling the ses.isPersistent() API. #22622

  • 解决由于网络 IP 地址更改和 ICE 导致 RTC 调用无法连接的网络问题。(Chromium 问题 1113227)。#24998

    ¥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 发行说明 获取新功能和变更的完整列表。

¥See the 10.0.0 release notes for a full list of new features and changes.

重大变化

¥Breaking Changes

  • enableRemoteModule 的默认值更改为 false#22091

    ¥Changed the default value of enableRemoteModule to false. #22091

    • 这是我们弃用 remote 模块并将其移至用户态的计划的一部分。你可以阅读并关注 这个问题,其中详细说明了我们这样做的原因,并包含建议的弃用时间表。

      ¥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.

  • app.allowRendererProcessReuse 的默认值更改为 true#22336Electron 9 中也包含)

    ¥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.

  • 修复了当 macOS 系统语言环境设置为 RTL 语言(例如阿拉伯语或希伯来语)时,窗口按钮的位置问题。无框架窗口应用在设置窗口样式时可能需要考虑到这一变化。#22016

    ¥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

有关这些变更和未来变更的更多信息,请参阅 计划中的突发事件变更 页面。

¥More information about these and future changes can be found on the Planned Breaking Changes page.

API 变更

¥API Changes

  • 会话:现在可以通过调用 ses.isPersistent() API 检查给定的 session 是否持久化。#22622

    ¥Session: Can now check if a given session is persistent by calling the ses.isPersistent() API. #22622

  • 内容:添加了 contents.getBackgroundThrottling() 方法和 contents.backgroundThrottling 属性。#21036

    ¥Contents: Added contents.getBackgroundThrottling() method and contents.backgroundThrottling property. #21036

已弃用的 API

¥Deprecated APIs

以下 API 现已弃用或删除:

¥The following APIs are now deprecated or removed:

  • 移除了 netLog 中已弃用的 currentlyLoggingPath 属性。此外,netLog.stopLogging 不再返回已记录日志的路径。#22732

    ¥Removed the deprecated currentlyLoggingPath property of netLog. Additionally, netLog.stopLogging no longer returns the path to the recorded log. #22732

  • 已弃用 crashReporter 中的未压缩崩溃上传。#23598

    ¥Deprecated uncompressed crash uploads in crashReporter. #23598

7.x.y 停止支持

¥End of Support for 7.x.y

根据项目的 支持政策,Electron 7.x.y 已达到支持终止状态。建议开发者和应用升级到较新版本的 Electron。

¥Electron 7.x.y has reached end-of-support as per the project's support policy. Developers and applications are encouraged to upgrade to a newer version of Electron.

下一步计划

¥What's Next

短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们计划大约每季度发布一次 Electron 的新主要版本及其组件的新版本。暂定 11.0.0 计划 列出了 Electron 11.0 开发生命周期中的关键日期。此外,查看我们的版本控制文档 提供了有关 Electron 版本控制的更多详细信息。

¥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. The tentative 11.0.0 schedule maps out key dates in the Electron 11.0 development life cycle. Also, see our versioning document for more detailed information about versioning in Electron.

有关即将推出的 Electron 版本 查看我们的“计划重大变更”文档 中计划的重大变更的信息。

¥For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

继续弃用 remote 模块(在 Electron 11 中)

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

我们开始着手移除 Electron 9 中的远程模块,并且我们仍在继续移除 remote 模块的计划。在 Electron 11 中,我们计划继续进行重构工作以实现 WeakRef,就像我们在 Electron 10 中所做的那样。请阅读并遵循 这个问题 以获取完整的弃用计划和详细信息。

¥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.

要求原生 Node 模块具备上下文感知或 N-API 的最后一步(在 Electron 12 中)

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

编辑:最初,这篇博文表示我们将在 Electron 11 中禁用渲染器进程重用。禁用渲染器进程重用现已推送至 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.

从 Electron 6 开始,我们一直在努力确保在渲染器进程中加载​​的 原生 Node 模块 必须是 N-API上下文感知。强制执行此更改可以提高安全性、加快性能并减少维护工作量。该计划的最后一步是移除 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.

Electron 成为 OpenJS 基金会影响力项目

· 3 min read

今天上午在 OpenJS 世界 会议上,我们宣布 Electron 已正式从 OpenJS 基金会的 孵化计划毕业,现在是 OpenJS 基金会的一个影响力项目。

¥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 于 2019 年 12 月进入孵化阶段 于蒙特利尔举行的上一届 OpenJS 基金会全球会议上发布。我们很高兴能够作为一个影响力项目在 JavaScript 社区中发挥更大的作用,并继续与 OpenJS 基金会保持合作。

¥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

你可以在 OpenJSF 网站 上阅读有关基金会、其使命及其成员的信息。OpenJS 基金会托管了许多开源 JavaScript 项目,包括 jQuery、Node.js 和 webpack。它得到了 30 家企业和终端用户成员的支持,其中包括 GoDaddy、谷歌、IBM、英特尔、Joyent 和微软。

¥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 是一个使用 Web 技术构建跨平台桌面应用的开源框架。要了解更多关于 Electron 背后的团队以及他们如何协同工作,请查看我们的 治理页面

¥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.

要开始使用 Electron 本身,请先了解 我们的文档

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

Google 文档季

· 5 min read

Electron 很荣幸能够参与 Google 第二届“文档季”计划,该计划将来自开源组织的导师与技术文档撰写者配对,以改进项目文档。

¥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.


什么是 Season of Docs?

¥What is Season of Docs?

Season of Docs logo

Season of Docs 是一个促进技术作家和开源社区之间合作的项目,使双方受益。开源维护者利用作者的技术写作专业知识来改进其文档的结构和内容,而技术作者则在导师的指导下加入开源社区。在 Google 的 Season of Docs 网站 上了解更多信息。

¥Season of Docs is a program that fosters collaboration between technical writers and open source communities to the benefit of both parties. Open source maintainers utilize the writer's technical writing expertise to improve the structure and content of their documentation, while the technical writer is introduced to an open-source community under the guidance of its mentors. Learn more about it on the Google's Season of Docs website.

这是我们首次参与该计划,我们将指导一位技术作家,他将与 Electron 的 生态系统工作组 合作,重塑我们文档的大部分内容。你可以了解更多关于整个项目 此处 的时间线的信息。

¥For our first time participating in the program, we'll be mentoring a single technical writer who will be working alongside Electron's Ecosystem Working Group to reshape large parts of our documentation. You can learn more about the timeline of the whole project here.

如何注册?

¥How do I sign up?

你有兴趣作为技术文档撰写者与我们合作吗?首先,熟悉一下 Google 今年的 技术作家指南 项目,并查看我们准备的两个 项目构想草案

¥Are you interested in collaborating with us as a technical writer? First, get familiar with Google's tech writer guide for this year's program, and check out the two project idea drafts that we have prepared.

想要被选为 Electron 文档季的技术作家,候选人需要在 6 月 8 日至 7 月 9 日的技术作家申请阶段,在 Google 文档季网站上提交申请。

¥In order to be selected as Electron's technical writer for Season of Docs, candidates will need to apply on the Google Season of Docs website during the Technical Writer Application phase that is running from June 8 to July 9..

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

¥Your application should include a proposal, which is a written document that describes in detail what you plan to achieve on the Electron docs over the course of 3 months. This proposal can either develop on one of the starting points mentioned in our Project Idea doc, or can be something entirely new. Don't know where to start? You can check out last year's list of accepted proposals for inspiration.

除了提案之外,我们还会考察你作为技术作家的背景。请附上你的简历副本,重点介绍相关的写作经验,以及技术写作示例(这些示例可以是现有的文档、教程、博客文章等)。

¥Aside from the proposal, we'll also be looking at your background as a technical writer. Please include a copy of your resume with an emphasis on relevant writing experience, as well as technical writing samples (these samples could be existing documentation, tutorial, blog posts, etc.)

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

¥If you want to discuss project proposals, shoot us an email at season-of-docs@electronjs.org and we can chat from there!

参考

¥References

Electron 9.0.0

· 10 min read

Electron 9.0.0 现已发布!它包含对 Chromium 83、V8 8.3 和 Node.js 12.14 的升级。我们为拼写检查功能添加了几个新的 API 集成,启用了 PDF 查看器等等!

¥Electron 9.0.0 has been released! It includes upgrades to Chromium 83, V8 8.3, and 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 正式发布!你可以通过 npm install electron@latest 使用 npm 安装它,也可以从我们的 发布网站。此版本包含升级、修复和新功能。我们迫不及待地想看看你使用它们构建的内容!继续阅读以了解有关此版本的详细信息,并请分享你的任何反馈!

¥The Electron team is excited to announce the release of Electron 9.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. The release is packed with upgrades, fixes, and new features. 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!

显著变化

¥Notable Changes

技术栈变更

¥Stack Changes

亮点功能

¥Highlight Features

  • 拼写检查功能有多项改进。请参阅 #22128#22368 中的更多详细信息。

    ¥Multiple improvements to the spellchecker feature. See more details in #22128 and #22368.

  • 提高了 Linux 上窗口事件处理程序的效率。#23260

    ¥Improved window events handler efficiency on Linux. #23260.

  • 启用 PDF 查看器。#22131

    ¥Enable PDF viewer. #22131.

请参阅 9.0.0 发行说明 获取新功能和变更的完整列表。

¥See the 9.0.0 release notes for a full list of new features and changes.

重大变化

¥Breaking Changes

  • 使用 remote 而不使用 enableRemoteModule: true 时,会发出弃用警告。#21546

    ¥Deprecation warning when using remote without enableRemoteModule: true. #21546

    • 这是我们弃用 remote 模块并将其移至用户态的计划的第一步。你可以阅读并关注 这个问题,其中详细说明了我们这样做的原因,并包含建议的弃用时间表。

      ¥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.

  • 默认将 app.enableRendererProcessReuse 设置为 true。#22336

    ¥Set app.enableRendererProcessReuse to true by default. #22336

    • 这是为满足未来在渲染器进程中加载​​的原生 Node 模块必须是 N-API上下文感知 的要求而进行的持续工作。完整信息和拟议时间表详见 这个问题

      ¥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.

  • 现在通过 IPC 发送非 JavaScript 对象会引发异常。#21560

    ¥Sending non-JavaScript objects over IPC now throws an exception. #21560

    • 此行为在 Electron 8.0 中已弃用。在 Electron 9.0 中,旧的序列化算法已被删除,发送此类不可序列化的对象现在将抛出 "无法克隆对象" 错误。

      ¥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.

有关这些变更和未来变更的更多信息,请参阅 计划中的突发事件变更 页面。

¥More information about these and future changes can be found on the Planned Breaking Changes page.

API 变更

¥API Changes

  • shell API 变更:

    ¥shell API changes:

    • shell.openItem API 已被异步 shell.openPath API 取代。proposal

      ¥The shell.openItem API has been replaced with an asynchronous shell.openPath API. proposal

  • sessionAPI 变更:

    ¥sessionAPI changes:

    • 添加了用于在词典中列出自定义单词的 session.listWordsFromSpellCheckerDictionary API。#22128

      ¥Added session.listWordsFromSpellCheckerDictionary API to list custom words in the dictionary. #22128

    • 添加了 session.removeWordFromSpellCheckerDictionary API,用于删除词典中的自定义单词。#22368

      ¥Added session.removeWordFromSpellCheckerDictionary API to remove custom words in the dictionary. #22368

    • 添加了用于访问基本服务工作线程信息和接收来自服务工作线程的控制台日志的 session.serviceWorkerContext API。#22313

      ¥Added session.serviceWorkerContext API to access basic service worker info and receive console logs from service workers. #22313

  • app API 变更:

    ¥app API changes:

    • 在 macOS 上为 app.focus() 添加了新的 force 参数,允许应用强制获取焦点。#23447

      ¥Added a new force parameter to app.focus() on macOS to allow apps to forcefully take focus. #23447

  • BrowserWindow API 变更:

    ¥BrowserWindow API changes:

    • 添加了对 BrowserWindow 上某些 getter/setter 对的属性访问的支持。#23208

      ¥Added support for property access to some getter/setter pairs on BrowserWindow. #23208

已弃用的 API

¥Deprecated APIs

以下 API 现已弃用或删除:

¥The following APIs are now deprecated or removed:

  • shell.openItem API 现已弃用,并被异步的 shell.openPath API 取代。

    ¥shell.openItem API is now depreciated, and replaced with an asynchronous shell.openPath API.

  • <webview>.getWebContents 在 Electron 8.0 中已被弃用,现已被移除。

    ¥<webview>.getWebContents, which was deprecated in Electron 8.0, is now removed.

  • webFrame.setLayoutZoomLevelLimits 在 Electron 8.0 中已被弃用,现已被移除。

    ¥webFrame.setLayoutZoomLevelLimits, which was deprecated in Electron 8.0, is now removed.

6.x.y 停止支持

¥End of Support for 6.x.y

根据项目的 支持政策,Electron 6.x.y 已达到支持终止状态。建议开发者和应用升级到较新版本的 Electron。

¥Electron 6.x.y has reached end-of-support as per the project's support policy. Developers and applications are encouraged to upgrade to a newer version of Electron.

下一步计划

¥What's Next

短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们计划大约每季度发布一次 Electron 的新主要版本及其组件的新版本。暂定 10.0.0 计划 列出了 Electron 10.0 开发生命周期中的关键日期。此外,查看我们的版本控制文档 提供了有关 Electron 版本控制的更多详细信息。

¥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. The tentative 10.0.0 schedule maps out key dates in the Electron 10.0 development life cycle. Also, see our versioning document for more detailed information about versioning in Electron.

有关即将推出的 Electron 版本 查看我们的“计划重大变更”文档 中计划的重大变更的信息。

¥For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

contextIsolation 的默认值从 false 更改为 true(从 Electron 10 开始)

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

如果没有 contextIsolation,任何在渲染器进程中运行的代码都很容易访问 Electron 内部或应用的预加载脚本。之后,该代码可以执行 Electron 想要限制的特权操作。

¥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.

更改此默认值可提高 Electron 应用的默认安全性,因此应用需要主动启用不安全的行为。Electron 将在 Electron 10.0 中弃用当前默认的 contextIsolation,并在 Electron 12.0 中改为使用新的默认版本 (true)。

¥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.

有关 contextIsolation 的更多信息、如何轻松启用它以及它的安全优势,请参阅我们专门的 上下文隔离文档

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

即将发布的 Electron 版本

· 3 min read

Electron 暂时停止主要版本发布

¥Electron is temporarily pausing major releases


发生了什么?

¥What's Happening?

我们的 主要发布节奏计划 与 Chromium 的同步发展,而 Chromium 项目最近由于工作安排的调整,决定转向 暂停发布。这意味着在 Chromium 改变更新节奏期间,Electron 也将暂时停止发布新的主要版本。

¥Our major release cadence schedule moves in lockstep with that of Chromium, and the Chromium project has made the recent decision to pause its releases due to adjusted work schedules. This means that for the duration of Chromium's altered cadence, Electron will also temporarily pause new major releases.

我们认为我们的最佳选择是追随 Chromium 的脚步,因此在此期间,Electron 团队将转而全职致力于错误修复、安全性、性能和稳定性。

¥We feel that our best choice is to follow in Chromium's footsteps, and so in the interim the Electron team will shift to full-time work on bugfixes, security, performance, and stability.

我们希望确保维护人员和用户的福祉在此期间得到优先考虑,因此我们欢迎你的反馈,并期待恢复正常的发布计划。

¥We want to ensure that both our maintainers and our consumers' wellbeing is prioritized during this time, so we welcome your feedback and look forward to returning to our regular release schedule.

更多更新,请关注我们的 Twitter 账号

¥For more updates, please follow our Twitter account.

编辑 (2020-03-30):Electron 9 稳定版将以 Chromium M83 为目标平台,并于 2020 年 5 月 19 日发布,以响应 Chromium 公告 跳过 M82 稳定版发布日期并调整 M83 稳定版发布日期的举措。

¥Edit (2020-03-30): Electron 9 stable will target Chromium M83 and be released on May 19, 2020, in response to Chromium's announcement of skipping the M82 stable date and adjusting the M83 stable date.

Electron 8.0.0

· 14 min read

Electron 8.0.0 已发布!它包含对 Chromium 80、V8 8.0 和 Node.js 12.13.0 的升级。我们添加了 Chrome 的内置拼写检查器等等!

¥Electron 8.0.0 has been released! It includes upgrades to Chromium 80, V8 8.0, and Node.js 12.13.0. We've added Chrome's built-in spellchecker, and much more!


Electron 团队非常高兴地宣布 Electron 8.0.0 正式发布!你可以通过 npm install electron@latest 使用 npm 安装它,也可以从我们的 发布网站。此版本包含升级、修复和新功能。我们迫不及待地想看看你使用它们构建的内容!继续阅读以了解有关此版本的详细信息,并请分享你的任何反馈!

¥The Electron team is excited to announce the release of Electron 8.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. The release is packed with upgrades, fixes, and new features. 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!

显著变化

¥Notable Changes

技术栈变更

¥Stack Changes

亮点功能

¥Highlight Features

  • 实现了 Chrome 内置拼写检查功能的使用。请参阅 #20692#21266 中的更多详细信息。

    ¥Implemented usage of Chrome's built-in spellchecker feature. See more details in #20692 and #21266.

  • IPC 通信现在使用 v8 的结构化克隆算法。与现有逻辑相比,这更快、功能更丰富、更令人意外,并且为大缓冲区和复杂对象带来了 2 倍的性能提升。小消息的延迟不会受到显著影响。请参阅 #20214 中的更多详细信息。

    ¥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 发行说明 获取新功能和变更的完整列表。

¥See the 8.0.0 release notes for a full list of new features and changes.

重大变化

¥Breaking Changes

  • 在上下文感知模块的弃用警告中显示模块名称。#21952

    ¥Show module name in deprecation warning for context-aware modules. #21952

    • 这是为满足未来在渲染器进程中加载​​的原生 Node 模块必须是 N-API上下文感知 的要求而进行的持续工作。完整信息和拟议时间表详见 这个问题

      ¥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.

  • 通过 IPC 发送的值现在使用结构化克隆算法进行序列化。#20214

    ¥Values sent over IPC are now serialized with Structured Clone Algorithm. #20214

  • 由于缺少维护人员,离屏渲染目前已停用。它在 Chromium 升级期间崩溃,随后被禁用。#20772

    ¥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

有关这些变更和未来变更的更多信息,请参阅 计划中的突发事件变更 页面。

¥More information about these and future changes can be found on the Planned Breaking Changes page.

API 变更

¥API Changes

  • app API 变更:

    ¥app API changes:

    • 添加了 app.getApplicationNameForProtocol(url)#20399

      ¥Added app.getApplicationNameForProtocol(url). #20399

    • 在 Windows 上添加了 app.showAboutPanel()app.setAboutPanelOptions(options) 支持。#19420

      ¥Added app.showAboutPanel() and app.setAboutPanelOptions(options) support on Windows. #19420

  • BrowserWindow API 变更:

    ¥BrowserWindow API changes:

    • 更新了文档,指出 BrowserWindow 选项 hasShadow 在所有平台 #20038 上均可用。

      ¥Updated docs to note that BrowserWindow options hasShadow is available on all platforms #20038

    • 在 BrowserWindow 选项中添加了 trafficLightPosition 选项,允许自定义交通信号灯按钮的位置。#21781

      ¥Added trafficLightPosition option to BrowserWindow options to allow custom positioning for traffic light buttons. #21781

    • 在 BrowserWindow 中添加了 accessibleTitle 选项,用于设置可访问的窗口标题 #19698

      ¥Added accessibleTitle option to BrowserWindow for setting the accessible window title #19698

    • BrowserWindow.fromWebContents() 现在可以返回 null #19983

      ¥BrowserWindow.fromWebContents() can now return null #19983

    • 添加了 BrowserWindow.getMediaSourceId()BrowserWindow.moveAbove(mediaSourceId)#18926

      ¥Added BrowserWindow.getMediaSourceId() and BrowserWindow.moveAbove(mediaSourceId). #18926

    • 添加了对 macOS 上 will-move 事件的支持。#19641

      ¥Added support for will-move event on macOS. #19641

  • 已记录之前未记录的 crashReporter.getCrashesDirectory()#20417

    ¥Documented previously undocumented crashReporter.getCrashesDirectory(). #20417

  • dialog API 变更:

    ¥dialog API changes:

    • dialog.showOpenDialogdialog.showOpenDialogSync 中添加了 dontAddToRecent 属性,以防止在打开的对话框中将文档添加到 Windows 上的最近文档中。#19669

      ¥Added dontAddToRecent property to dialog.showOpenDialog and dialog.showOpenDialogSync to prevent documents from being added to recent documents on Windows in open dialogs. #19669

    • dialog.showSaveDialogdialog.showSaveDialogSync 添加了属性自定义。#19672

      ¥Added property customization to dialog.showSaveDialog and dialog.showSaveDialogSync. #19672

  • Notification API 变更:

    ¥Notification API changes:

    • timeoutType 选项中,Linux/Windows 用户可设置通知超时类型。#20153

      ¥Added timeoutType option to allow Linux/Windows users to set the type of notification timeout. #20153

    • 在 Linux 通知中添加了 urgency 选项,用于设置紧急程度。#20152

      ¥Added urgency option to set urgency on Linux notifications. #20152

  • session API 变更:

    ¥session API changes:

    • 更新了 session.setProxy(config)session.setCertificateVerifyProc(proc) 的文档,指出了可选选项。#19604

      ¥Updated documentation on session.setProxy(config) and session.setCertificateVerifyProc(proc) to note optional options. #19604

    • 添加 session.downloadURL(url) 以允许在没有浏览器窗口的情况下触发下载。#19889

      ¥Added session.downloadURL(url) to allow to triggering downloads without a BrowserWindow. #19889

    • 通过 session.preconnect(options)preconnect 事件添加了对 HTTP 预连接资源提示的支持。#18671

      ¥Added support for HTTP preconnect resource hints via session.preconnect(options) and the preconnect event. #18671

    • 添加 session.addWordToSpellCheckerDictionary 以允许在词典 #21297 中使用自定义单词

      ¥Added session.addWordToSpellCheckerDictionary to allow custom words in the dictionary #21297

  • 在 macOS 上为 shell.moveItemToTrash(fullPath[, deleteOnFail]) 添加了选项,用于指定 moveItemToTrash 失败时发生的情况。#19700

    ¥Added option to shell.moveItemToTrash(fullPath[, deleteOnFail]) on macOS to specify what happens when moveItemToTrash fails. #19700

  • systemPreferences API 变更:

    ¥systemPreferences API changes:

    • 更新了 macOS 版 systemPreferences.getColor(color) 文档。#20611

      ¥Updated systemPreferences.getColor(color) documentation for macOS. #20611

    • systemPreferences.getMediaAccessStatus() 添加了 screen 媒体类型。#20764

      ¥Added screen media type to systemPreferences.getMediaAccessStatus(). #20764

  • 添加了 nativeTheme.themeSource 以允许应用覆盖 Chromium 和操作系统的主题选择。#19960

    ¥Added nativeTheme.themeSource to allow apps to override Chromium and the OS's theme choice. #19960

  • TouchBar API 变更:

    ¥TouchBar API changes:

    • TouchBarButtonTouchBarLabel 中添加了 accessibilityLabel 属性,以提高 TouchBarButton/TouchBarLabel 的可访问性。#20454

      ¥Added accessibilityLabel property to TouchBarButton and TouchBarLabel to improve TouchBarButton/TouchBarLabel accessibility. #20454

    • 更新了 TouchBar 相关文档 #19444

      ¥Updated TouchBar related documentation #19444

  • tray API 变更:

    ¥tray API changes:

    • tray.displayBalloon() 添加了新选项:iconTypelargeIconnoSoundrespectQuietTime#19544

      ¥Added new options to tray.displayBalloon(): iconType, largeIcon, noSound and respectQuietTime. #19544

    • 添加了 tray.removeBalloon(),用于移除已显示的气球通知。#19547

      ¥Added tray.removeBalloon(), which removes an already displayed balloon notification. #19547

    • 添加了 tray.focus(),用于将焦点返回到任务栏通知区域。壮举:添加 tray.focus() #19548

      ¥Added tray.focus(), which returns focus to the taskbar notification area. feat: add tray.focus() #19548

  • webContents API 变更:

    ¥webContents API changes:

    • 添加 contents.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture]) 以在 webContents API 上公开 executeJavaScriptInIsolatedWorld。#21190

      ¥Added contents.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture]) to expose executeJavaScriptInIsolatedWorld on the webContents API. #21190

    • 添加了用于捕获隐藏 webContents 的方法。#21679

      ¥Added methods to capture a hidden webContents. #21679

    • webContents.print([options], [callback]) 添加了选项,以便自定义打印页眉和页脚。#19688

      ¥Added options to webContents.print([options], [callback]) to enable customization of print page headers and footers. #19688

    • 添加了通过 webContents.getAllSharedWorkers()webContents.inspectSharedWorkerById(workerId) 检查特定共享工作器的功能。#20389

      ¥Added ability to inspect specific shared workers via webContents.getAllSharedWorkers() and webContents.inspectSharedWorkerById(workerId). #20389

    • 在 WebContents.printToPDF() 中添加了对 fitToPageEnabledscaleFactor 选项的支持。#20436

      ¥Added the support of fitToPageEnabled and scaleFactor options in WebContents.printToPDF(). #20436

  • 更新了 webview.printToPDF 文档,指出返回类型现在为 Uint8Array。#20505

    ¥Updated webview.printToPDF documentation to indicate return type is now Uint8Array. #20505

已弃用的 API

¥Deprecated APIs

以下 API 现已弃用:

¥The following APIs are now deprecated:

  • 已弃用 BrowserWindow.setVisibleOnAllWorkspaces 中不起作用的 visibleOnFullScreen 选项,并在下一个主要版本中将其移除。#21732

    ¥Deprecated the nonfunctional visibleOnFullScreen option within BrowserWindow.setVisibleOnAllWorkspaces prior to its removal in the next major release version. #21732

  • 已弃用 macOS 系统上 systemPreferences.getColor(color) 上的 alternate-selected-control-text#20611

    ¥Deprecated alternate-selected-control-text on systemPreferences.getColor(color) for macOS. #20611

  • 已弃用 webContentswebFrame<webview> Tag 上的 setLayoutZoomLevelLimits,因为 Chromium 移除了此功能。#21296

    ¥Deprecated setLayoutZoomLevelLimits on webContents, webFrame, and <webview> Tag because Chromium removed this capability. #21296

  • app.allowRendererProcessReusefalse 默认值现已弃用。#21287

    ¥The default value of false for app.allowRendererProcessReuse is now deprecated. #21287

  • 已弃用 <webview>.getWebContents(),因为它依赖于远程模块。#20726

    ¥Deprecated <webview>.getWebContents() as it depends on the remote module. #20726

5.x.y 停止支持

¥End of Support for 5.x.y

根据项目的 支持政策,Electron 5.x.y 已达到支持终止状态。建议开发者和应用升级到较新版本的 Electron。

¥Electron 5.x.y has reached end-of-support as per the project's support policy. Developers and applications are encouraged to upgrade to a newer version of Electron.

应用反馈计划

¥App Feedback Program

我们继续使用我们的 应用反馈计划 进行测试。参与此计划的项目在其应用上测试 Electron 测试版;作为回报,他们发现的新 bug 将优先发布到稳定版本。如果你想参与或了解更多信息,请联系 查看我们关于该程序的博客文章

¥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.

下一步计划

¥What's Next

短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们计划大约每季度发布一次 Electron 的新主要版本及其组件的新版本。暂定 9.0.0 计划 模块列出了 Electron 9 开发生命周期中的关键日期。此外,查看我们的版本控制文档 提供了有关 Electron 版本控制的更多详细信息。

¥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. The tentative 9.0.0 schedule maps out key dates in the Electron 9 development life cycle. Also, see our versioning document for more detailed information about versioning in Electron.

有关即将推出的 Electron 版本 查看我们的“计划重大变更”文档 中计划的重大变更的信息。

¥For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

remote 模块弃用(从 Electron 9 开始)

¥Deprecation of remote Module (Starting in Electron 9)

由于存在严重的安全隐患,我们计划从 Electron 9 开始弃用 remote 模块。你可以阅读并关注 这个问题,其中详细说明了我们这样做的原因,并包含建议的弃用时间表。

¥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.

Electron 加入 OpenJS 基金会

· 5 min read

在蒙特利尔的 Node+JS 交互 会议上,OpenJS 基金会 宣布 Electron 已加入基金会的孵化计划。基金会致力于支持 JavaScript 生态系统和 Web 技术的健康发展,提供一个中立的组织来托管和维护项目,并共同资助造福整个社区的活动。

¥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.

OpenJS 基金会托管了许多开源 JavaScript 项目,包括 jQuery、Node.js 和 webpack。它得到了 30 家企业和终端用户成员的支持,其中包括 GoDaddy、谷歌、IBM、英特尔、Joyent 和微软。Electron 是一个使用 Web 技术构建跨平台桌面应用的开源框架。

¥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.

这对 Electron 来说是一个激动人心的举措,我们将其视为我们作为开源项目发展的下一步。

¥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 加入 OpenJS 基金会并不会改变 Electron 的开发、发布和使用方式,也不会直接影响使用 Electron 构建应用的开发者。尽管 Electron 最初于 2013 年在 GitHub 上创建,但目前由许多组织和个人维护。2019 年,Electron 规范了其治理结构,并投入巨资正式确定影响整个项目的决策方式。我们相信,多个组织和开发者在 Electron 上进行投资和合作,会使项目更加强大。

¥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.

随着我们开源项目日渐成熟,将 Electron 从单一企业实体所有提升到一个专注于支持 Web 和 JavaScript 生态系统的中立基金会是理所当然的下一步。

¥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

你可以在 OpenJSF 网站 上阅读有关基金会、其使命及其成员的信息。有关 Electron 加入 OpenJSF 孵化计划的更多信息和相关引用,请查看官方新闻稿。要了解更多关于 Electron 背后的团队以及他们如何协同工作,请查看我们的 治理页面

¥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.

要开始使用 Electron 本身,请先了解 我们的文档

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

Chromium WebAudio 漏洞修复 (CVE-2019-13720)

· 3 min read

Chrome 中发现了一个高危漏洞,该漏洞会影响所有基于 Chromium 的软件,包括 Electron。

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

此漏洞已被分配 CVE-2019-13720。你可以在 Chrome 博客帖子 中了解更多信息。

¥This vulnerability has been assigned CVE-2019-13720. You can read more about it in the Chrome Blog Post.

请注意,Chrome 已报告此漏洞正在被广泛利用,因此强烈建议你尽快升级 Electron。

¥Please note that Chrome has reports of this vulnerability being used in the wild so it is strongly recommended you upgrade Electron as soon as possible.


范围

¥Scope

这会影响任何可能运行第三方或不受信任的 JavaScript 的 Electron 应用。

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

缓解措施

¥Mitigation

受影响的应用应升级到 Electron 的修补版本。

¥Affected apps should upgrade to a patched version of Electron.

我们已发布 Electron 的新版本,其中包含针对此漏洞的修复:

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

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

¥Electron 7.0.1 automatically included the fix from upstream, before the announcement was made. Electron 8 is similarly unaffected. The vulnerability did not exist in Electron 5, so that version is also unaffected.

更多信息

¥Further Information

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

¥This vulnerability was discovered by Anton Ivanov and Alexey Kulaev at Kaspersky Labs and reported to the Chrome team. The Chrome blog post can be found here.

要了解有关保护 Electron 应用安全的最佳实践的更多信息,请参阅我们的 安全教程

¥To learn more about best practices for keeping your Electron apps secure, see our security tutorial.

如果你想报告 Electron 中的漏洞,请发送电子邮件至 security@electronjs.org

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

Electron 7.0.0

· 7 min read

Electron 7.0.0 已发布!此更新包含对 Chromium 78、V8 7.8 和 Node.js 12.8.1 的升级。我们添加了基于 Arm 64 的 Window 版本、更快的 IPC 方法、新的 nativeTheme API 等等!

¥Electron 7.0.0 has been released! It includes upgrades to Chromium 78, V8 7.8, and Node.js 12.8.1. We've added a Window on Arm 64 release, faster IPC methods, a new nativeTheme API, and much more!


Electron 团队非常高兴地宣布 Electron 7.0.0 正式发布!你可以通过 npm install electron@latest 使用 npm 安装它,也可以从我们的 发布网站。此版本包含升级、修复和新功能。我们迫不及待地想看看你使用它们构建的内容!继续阅读以了解有关此版本的详细信息,并请分享你的任何反馈!

¥The Electron team is excited to announce the release of Electron 7.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. The release is packed with upgrades, fixes, and new features. 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!

显著变化

¥Notable Changes

  • 堆栈升级:

    ¥Stack Upgrades:

    StackElectron 6 版本Electron 7 版本新功能
    Chromium76.0.3809.14678.0.3905.17778
    V87.67.87.77.8
    Node.js12.4.012.8.112.5, 12.6, 12.7, 12.8, 12.8.1
  • 添加了 Windows on Arm(64 位)版本。#18591#20112

    ¥Added Windows on Arm (64 bit) release. #18591, #20112

  • 添加了 ipcRenderer.invoke()ipcMain.handle(),用于异步请求/响应式 IPC。强烈建议使用这些注解,而不是 remote 模块。更多信息请参阅这篇“Electron 的“远程”模块被认为有害”博客文章。#18449

    ¥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

  • 添加了 nativeTheme API,用于读取并响应操作系统主题和配色方案的变化。#19758#20486

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

  • 已切换到新的 TypeScript 定义 generator。最终的定义更加精确;因此,如果你的 TypeScript 构建失败,这可能是原因。#18103

    ¥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

请参阅 7.0.0 发行说明 获取更长的变更列表。

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

重大变化

¥Breaking Changes

有关这些变更和未来变更的更多信息,请参阅 计划中的突发事件变更 页面。

¥More information about these and future changes can be found on the Planned Breaking Changes page.

  • 移除已弃用的 API:

    ¥Removed deprecated APIs:

    • 基于回调的函数版本,现在使用 Promises。#17907

      ¥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() 不再允许过滤已清除的缓存条目。#17970

    ¥Session.clearAuthCache() no longer allows filtering the cleared cache entries. #17970

  • macOS 上的原生界面(菜单、对话框等)现在会自动匹配用户设备上的暗黑模式设置。#19226

    ¥Native interfaces on macOS (menus, dialogs, etc.) now automatically match the dark mode setting on the user's machine. #19226

  • 更新了 electron 模块以使用 @electron/get。现在支持的最低 Node 版本是 Node 8。#18413

    ¥Updated the electron module to use @electron/get. The minimum supported node version is now Node 8. #18413

  • 文件 electron.asar 已不存在。任何依赖于此的打包脚本都应进行更新。#18577

    ¥The file electron.asar no longer exists. Any packaging scripts that depend on its existence should be updated. #18577

4.x.y 停止支持

¥End of Support for 4.x.y

根据项目的 支持政策,Electron 4.x.y 已终止支持。建议开发者和应用升级到较新版本的 Electron。

¥Electron 4.x.y has reached end-of-support as per the project's support policy. Developers and applications are encouraged to upgrade to a newer version of Electron.

应用反馈计划

¥App Feedback Program

我们继续使用我们的 应用反馈计划 进行测试。参与此计划的项目在其应用上测试 Electron 测试版;作为回报,他们发现的新 bug 将优先发布到稳定版本。如果你想参与或了解更多信息,请联系 查看我们关于该程序的博客文章

¥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.

下一步计划

¥What's Next

短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们计划大约每季度发布一次 Electron 的新主要版本及其组件的新版本。暂定 8.0.0 计划 模块列出了 Electron 8 开发生命周期中的关键日期。此外,查看我们的版本控制文档 提供了有关 Electron 版本控制的更多详细信息。

¥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. The tentative 8.0.0 schedule maps out key dates in the Electron 8 development life cycle. Also, see our versioning document for more detailed information about versioning in Electron.

有关即将推出的 Electron 版本 查看我们的“计划重大变更”文档 中计划的重大变更的信息。

¥For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.