跳转到主内容

· 阅读时间:约 8 分钟

在过去几周里,我们收到了关于新的 WebView2 和 Electron 之间差异的几个问题。

我们两个团队都致力于让 Web 技术在桌面上能发挥出最佳效用,同时互相讨论比较了二者之间的共性与不同之处。

Electron 和 WebView2 都处在一个快速不断发展的进程中。 我们将对 Electron 与 WebView2 之间现有的相似之处与不同的地方做简短的概述。


架构概述

Electron 和 WebView2 都是从 Chromium 源代码构建的,用于渲染网页内容。 严格地说,WebView2 是从 Edge 源构建的,Edge 构建于 Chromium 源的一个分支上。 Electron 不与 Chrome 共享任何 DLL。 WebView2 的二进制文件与 Edge 硬链接(Edge 90 的稳定版本),因此他们共享磁盘和一些工作集。 更多信息,请参阅 Evergreen distribution mode

Electron 应用程序总是以开发时确认的 Electron 版本,打包和发布。 WebView2 有两个分布选项。 你可以打包确切的 WebView2 库到你的应用程序,或你可以使用系统中已经存在的共享运行版本。 WebView2 为每种方法提供了工具,包括缺少共享运行时的引导安装程序。 WebView2 从 Windows 11 开始直接提供。

打包框架的应用程序负责更新框架,包括安全的次要版本。 对于使用共享 WebView2 运行时的应用,WebView2 具有自己的更新程序,类似于 Chrome 或 Edge,独立于您的应用程序。 要更新应用程序自己的代码或其它依赖仍然是开发人员自己负责,这与 Electron 一样。 无论是 Electron,还是 WebView2 都不受 Windows Update 管理。

Electron 和 WebView2 都继承了 Chromium 的多进程架构,即一个主进程与一个或多个渲染器进程相连。 这些进程与系统上运行的其他应用程序完全分离。 每个 Electron 应用程序都是一个单独的进程树,包含一个根浏览器进程、一些公共进程以及零个或多个渲染进程。 WebView2 应用间使用相同的 用户数据文件夹 (就像一套应用一样),共享非渲染进程。 WebView2 应用使用不同的 数据文件夹,不共享进程。

  • ElectronJS 进程模型:

    ElectronJS 进程模型图解

  • 基于 WebView2 的应用程序进程模型:

    WebView2 进程模型图解

了解关于 WebView2 进程模型 Electron 进程模型 的更多信息。

Electron 提供常见的桌面应用程序所需要的 API,如菜单、文件系统访问、通知等等。 WebView2 是一个组件,意味着需要被集成到应用程序框架中,如 WinForms、WPF、WinUI 或 Win32。 WebView2 不提供 Web 标准 JavaScript 之外的操作系统 API。

Node.js 被集成到 Electron 中。 Electron应用程序可以在渲染进程和主进程中使用,任何 Node.js API,模块,或 node 本地模块(node-native-addon)。 WebView2 不知道您的应用程序使用哪种语言或框架编写。 您的 JavaScript 代码必须通过应用程序主进程代理操作系统访问。

Electron 努力维持与 Web API 的兼容性,包括从 Fugu Project 被开发的 API。 我们有一个 Electron 的 Fugu API 兼容快照。 WebView2 维护着一个 与 Edge 差异 API (API differences from Edge) 相似的列表。

Electron 为 web 内容提供一个可配置的安全模型,从完全访问到完全沙箱。 WebView2 内容始终是沙盒。 Electron 为您选择安全模型提供 全面的安全文档 。 WebView2 也有提供 安全最佳实践

Electron 源码在 GitHub 上维护与获取。 应用程序可以自己修改,构建属于自己的 独特 Electron. WebView2 源码不能在 Github 上获取。

摘要:

ElectronWebView2
构建依赖ChromiumEdge
源码在 Github
共享 Edge/Chrome 动态库是 (从 Edge 90 版本)
应用程序之间的共享运行时可选
应用程序 API
Node.js
Sandbox可选始终
需要应用程序框架
支持平台Mac, Win, LinuxWin (Mac/Linux 计划中)
应用之间的进程共享从不可选
框架更新管理通过应用程序WebView2

性能讨论

在渲染 Web 内容时,我们认为 Electron,WebView2 和其他基于 Chromium 的渲染之间的性能差异很小。 我们为感兴趣研究性能间差异的人员,以 Electron、C++ + WebView2 和 C# + WebView2 创建了 脚手架

在渲染 Web 内容 之外 有一些差异,来自 Electron,WebView2,Edge,PWA,和 其它表示感兴趣工作的详细比较。

进程间通信 (IPC)

我们明确强调一个差异,因为我们认为这通常是 Electron 应用程序中的性能考虑因素。

在 Chromium 中,浏览器进程(browser process)作为渲染进程沙盒与系统其部分间的 IPC 中间人。 虽然 Electron 允许未沙盒化的渲染进程,但很多应用程序仍选择启用沙盒以增加安全性。 WebView2 始终启用沙盒,所以对于大多数 Electron 和 WebView2 应用程序,IPC 可能会影响整体性能。

尽管 Electron 和 WebView2 具有相似的进程模型,但底层 IPC 不同。 在 JavaScript 和 C++ 或 C# 之间进行通信需要 转换(marshalling),常见的是 JSON 字符串。 JSON 序列化/解析是一项代价高昂的操作,IPC 瓶颈可能会对性能产生负面影响。 从 Edge 93 开始,Webview2 将针对网络事件使用 CBOR(简洁的二进程序列化)

Electron 通过 MessagePorts API 支持任何两个进程之间的直接 IPC,利用 结构化克隆算法。 利用此手段的应用程序可以避免在进程之间发送对象时支付 JSON 序列化税。

摘要

Electron 和 WebView2 有一些差异,但在他们如何执行 Web 内容方面不会有太大差异。 最后,应用程序架构和 JavaScript 库/框架对内存和性能的影响比其他任何内容都要大,因为无论 Chromium 运行在何处, Chromium 都是 Chromium

特别感谢 WebView2 团队审阅了这篇文章,并确保我们拥有 WebView2 架构的最新视图。 他们欢迎对项目的任何反馈意见

· 阅读时间:约 7 分钟

从2021年9月开始,Electron将每8周发布一个新的主要稳定版本。


2019年,Electron 改为12周的发布周期,以匹配 Chromium 的6周发布周期。 最近,Chrome 和 Microsoft 都发生了一些变化,使得我们重新考虑更改 Electron 目前的发布频率:

  1. Chromium 计划从2021年9月21日的 Chrome 94 开始每4周发布一个新的里程碑。此版本节奏还每8周添加新的"扩展稳定"选项,其中包含所有更新的安全修补程序。

  2. 微软应用商店要求 基于Chromium应用的版本号不得低于最新发行版本2个版本号。 例如,如果最新发布的Chromium主版本号为85,任何基于Chromium的应用其所用版本必须为83或更高。 以上规则包含Electron应用。

从2021年9月开始,Electron将每8周发布一个新的主要稳定版本,以匹配Chromium的8周扩展稳定版本。

Our first release with Chromium Extended Stable will be Electron 15 on September 21st, 2021.

Knowing that a release cadence change will impact other downstream applications, we wanted to let our developer community know as soon as possible. Read on for more details about our 2021 release schedule.

Electron 15: Temporary Alpha

Given that our original Electron 15 release targeted a non-Extended Stable version (Chromium's Extended Stable versions are based on their even-numbered versions), we needed to change our original target release date. However, an Electron app must use the most recent 2 major versions of Chromium to be accepted to the Microsoft Store, which made waiting for two Chromium versions untenable.

With these two requirements, our team faced a timing dilemma. Moving Electron 15 to include Chromium M94 would allow app developers to get on the very first Extended Stable version of Chromium; however, it would also shorten the beta-to-stable cycle to only 3 weeks.

To help with this switchover, Electron will offer a temporary alpha build, only for the Electron 15 release. This alpha build will allow developers more time to test and plan for an Electron 15 release, with a more stable build than our current nightlies.

The alpha channel build will ship for Electron 15 on July 20th, 2021. It will transition to a beta release on September 1st, 2021 with a stable release target of September 21st, 2021. Subsequent Electron releases will not have alpha releases.

2021 Plan for Releases

Below is our current release schedule for 2021:

ElectronChromeAlpha ReleaseBeta ReleaseStable ReleaseStable Cycle (Weeks)
E13M91-2021-Mar-052021-May-2512
E14M93-2021-May-262021-Aug-3114
E15M942021-Jul-202021-Sep-012021-Sep-219 (includes alpha)
E16M96-2021-Sep-222021-Nov-168
E17M98-2021-Nov-172022-Feb-0111

Adding the alpha channel extends the development time before Electron 15's launch from 3 weeks to 9 weeks - closer to our new 8 week cycle, while still meeting the requirements for Windows Store submission.

To further help app developers, for the remainder of 2021 until May 2022, we will also be extending our supported versions policy from the latest 3 versions to the latest 4 versions of Electron. That means that even if you can't immediately alter your upgrade schedule, older versions of Electron will still receive security updates and fixes.

Addressing Concerns

There's a reason we're publishing this post well before this release cycle change is scheduled. We know that a faster release cycle will have a real impact on Electron apps - some of which may already find our major release cadence aggressive.

We've tried to address common concerns below:

❓ Why even make this change? Why not keep the 12 week release cadence?

To deliver the most up-to-date versions of Chromium in Electron, our schedule needs to track theirs. More information around Chromium's release cycle can be found here.

Additionally, the current 12 week release cadence would be untenable with the Microsoft Store's new submission requirements. Even apps on the latest stable version of Electron would experience a roughly two week period where their app may be rejected under the new security requirements.

Every new Chromium release contains new features, bug fixes / security fixes, and V8 improvements. We want you, as app developers, to have these changes in a timely manner, so our stable release dates will continue to match every other Chromium stable release. As an app developer, you'll have access to new Chromium and V8 features and fixes sooner than before.

❓ The existing 12 week release schedule already moves quickly. What steps are the team taking to make upgrading easier?

One advantage of more frequent releases is having smaller releases. We understand that upgrading Electron's major versions can be difficult. We hope that smaller releases will introduce fewer major Chromium and Node changes, as well as fewer breaking changes, per release.

❓ Will there been an alpha release available for future Electron versions?

There are no plans to support a permanent alpha release at this time. This alpha is only intended for Electron 15, as a way to help developers upgrade more easily in the shortened release period.

❓ Will Electron extend the number of supported versions?

We will be extending our supported version policy from the latest three versions to the latest four versions of Electron until May 2022, with the release of Electron 19. After Electron 19 is released, we'll return to supporting the latest three major versions, as well as the beta and nightly releases.

E13 (May'21)E14 (Aug'21)E15 (Sep'21)E16 (Nov'21)E17 (Feb'22)E18 (Mar'22)E19 (May'22)
13.x.y14.x.y15.x.y16.x.y17.x.y18.x.y19.x.y
12.x.y13.x.y14.x.y15.x.y16.x.y17.x.y18.x.y
11.x.y12.x.y13.x.y14.x.y15.x.y16.x.y17.x.y
----12.x.y13.x.y14.x.y15.x.y--

问题?

📨 If you have questions or concerns, please mail us at info@electronjs.org or join our Discord. We know this is a change that will impact many apps and developers, and your feedback is very important to us. We want to hear from you!

· 阅读时间:约 3 分钟

Electron 13.0.0 已发布! 它包括了到 Chromium 91 和 V8 9.1 的更新。 我们添加了多个 API 更新、错误修复和一般改进。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 13.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 Continue reading for details about this release, and please share any feedback you have!

Notable Changes

Stack Changes

Highlight Features

  • Added process.contextIsolated property that indicates whether the current renderer context has contextIsolation enabled. #28252
  • Added new session.storagePath API to get the path on disk for session-specific data. #28866
  • Deprecated the new-window event of WebContents. It is replaced by webContents.setWindowOpenHandler()
  • Added process.contextId used by @electron/remote. #28251

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

重大更改

  • window.open() parameter frameName is no longer set as window title. #27481
  • Changed session.setPermissionCheckHandler(handler) to allow for handler's first parameter, webContents to be null. #19903

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

API 更改

  • Added roundedCorners option for BrowserWindow. #27572
  • Added new session.storagePath API to get the path on disk for session-specific data.28866
  • Added support for passing DOM elements over the context bridge. #26776
  • Added process.uptime() to sandboxed renderers. #26684
  • Added missing fields to the parameters emitted as part of the context-menuevent.#26788
  • Added support for registering Manifest V3 extension service workers.
  • Added ‘registration-completed’ event to ServiceWorkers. #27562

Removed/Deprecated Changes

The following APIs have been removed or are now deprecated:

  • Deprecated the new-window event of WebContents. It is replaced by webContents.setWindowOpenHandler()

  • Removed deprecated shell.moveItemToTrash(). #26723

  • Removed the following deprecated BrowserWindow extension APIs:

    • BrowserWindow.addExtension(path)

    • BrowserWindow.addDevToolsExtension(path)

    • BrowserWindow.removeExtension(name)

    • BrowserWindow.removeDevToolsExtension(name)

    • BrowserWindow.getExtensions()

    • BrowserWindow.getDevToolsExtensions()

      Use the session APIs instead:

    • ses.loadExtension(path)

    • ses.removeExtension(extension_id)

    • ses.getAllExtensions()

  • systemPreferences 方法已经被废弃:

    • systemPreferences.isDarkMode()

    • systemPreferences.isInvertedColorScheme()

    • systemPreferences.isHighContrastColorScheme()

      使用 nativeTheme 属性作为替代:

    • nativeTheme.shouldUseDarkColors

    • nativeTheme.shouldUseInvertedColorScheme

    • nativeTheme.shouldUseHighContrastColors

End of Support for 10.x.y

Electron 10.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

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. 暂定 14.0.0 时间表 展示了 Electron 14.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.

· 阅读时间:约 5 分钟

Electron 12.0.0 已发布! It includes upgrades to Chromium 89, V8 8.9 and Node.js 14.16. We've added changes to the remote module, new defaults for contextIsolation, a new webFrameMain API, and general improvements. 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 12.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 Continue reading for details about this release, and please share any feedback you have!

Notable Changes

Stack Changes

Highlight Features

  • The ContextBridge exposeInMainWorld method can now expose non-object APIs. #26834
  • Upgraded from Node 12 to Node 14. #23249
  • Added a new webFrameMain API for accessing sub-frames of a WebContents instance from the main process. #25464
  • The default values of contextIsolation and worldSafeExecuteJavaScript are now true. #27949 #27502

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

重大更改

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

API 更改

  • Added webFrameMain API: The webFrameMain module can be used to look up frames across existing WebContents instances. This is the main process equivalent of the existing webFrame API. More information about this new API can be found here, and in our documentation.
  • app API changes:
    • Added non-localized serviceName to 'child-process-gone' / app.getAppMetrics(). #25975
    • Added new app.runningUnderRosettaTranslation property to detect when running under rosetta on Apple silicon. #26444
    • Added exitCode to render-process-gone details (app & webContents). #27677
  • BrowserWindow API changes:
    • Added BrowserWindow.isTabletMode() API. #25209
    • Added resized (Windows/macOS) and moved (Windows) events to BrowserWindow. #26216
    • Added new system-context-menu event to allow preventing and overriding the system context menu. #25795
    • Added win.setTopBrowserView() so that BrowserViews can be raised. #27713
    • Added webPreferences.preferredSizeMode to allow sizing views according to their document's minimum size. #25874
  • contextBridge API changes:
    • Allowed ContextBridge exposeInMainWorld method to expose non-object APIs. #26834
  • display API changes:
    • Added displayFrequency property to the Display object to allow getting information about the refresh rate on Windows. #26472
  • extensions API changes:
    • Added support for some chrome.management APIs. #25098
  • MenuItem API changes:
    • Added support for showing macOS share menu. #25629
  • net API changes:
    • Added a new credentials option for net.request(). #25284
    • Added net.online for detecting whether there is currently internet connection. #21004
  • powerMonitor API changes:
    • Added powerMonitor.onBatteryPower. #26494
    • Added fast user switching event to powerMonitor on macOS. #25321
  • session API changes:
    • Added allowFileAccess option to ses.loadExtension() API. #27702
    • Added display-capture API for session.setPermissionRequestHandler. #27696
    • Added a disabledCipherSuites option to session.setSSLConfig. #25818
    • Added extension-loaded, extension-unloaded, and extension-ready events to session. #25385
    • Added session.setSSLConfig() to allow configuring SSL. #25461
    • Added support for explicitly specifying direct, auto_detect or system modes in session.setProxy(). #24937
    • Added Serial API support. #25237
    • Added APIs to enable/disable spell checker. #26276
  • shell API changes:
    • Added a new asynchronous shell.trashItem() API, replacing the synchronous shell.moveItemToTrash(). #25114
  • webContents API changes:
    • Added a small console hint to console to help debug renderer crashes. #25317
    • Added frame and webContents properties to the details object in webRequest handlers. #27334
    • Added webContents.forcefullyCrashRenderer() to forcefully terminate a renderer process to assist with recovering a hung renderer. #25580
    • Added setWindowOpenHandler API for renderer-created child windows, and deprecate new-window event. #24517
  • webFrame API changes:
    • Added spellcheck API to renderer. #25060

Removed/Deprecated Changes

The following APIs have been removed or are now deprecated:

  • Deprecated the remote module. It is replaced by @electron/remote. #25293
  • Removed deprecated crashReporter APIs. #26709
  • Removed links to the Electron website from the default 'Help' menu in packaged apps. #25831

End of Support for 9.x.y

Electron 9.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

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. 暂定 13.0.0 时间表 展示了 Electron 13.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.

· 阅读时间:约 4 分钟

Electron 11.0.0 已发布! 它包括升级到 Chromium 87, V8 8.7, 和 Node.js 12.18.3。 We've added support for Apple silicon, and general improvements. 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 11.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 新版本包括内容更新及问题修复,提供对Apple M1的硬件支持。

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

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

重大更改

  • 移除实验性API: BrowserView.{fromId, fromWebContents, getAllViews}BrowserViewid属性. #23578

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

API 更改

  • Added app.getApplicationInfoForProtocol() API that returns detailed information about the app that handles a certain protocol. #24112
  • Added app.createThumbnailFromPath() API that returns a preview image of a file given its file path and a maximum thumbnail size. #24802
  • Added webContents.forcefullyCrashRenderer() to forcefully terminate a renderer process to assist with recovering a hung renderer. #25756

End of Support for 8.x.y

Electron 8.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

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 to release new major versions of Electron with new versions of those components approximately quarterly. 暂定 12.0.0 时间表 展示了 Electron 12.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.

未来将弃用 remote 模块

我们已经着手移除Electron 9中的 remote 模块, 计划在Electron 14中完成。

要想知道有关移除计划的全部细节,请阅读并关注 这里

Final Step for Requiring Native Node Modules to be Context Aware or N-API (in 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.

要想知道其他细节或时间相关的问题,请阅读并关注 这里

· 阅读时间:约 3 分钟

With Apple Silicon hardware being released later this year, what does the path look like for you to get your Electron app running on the new hardware?


With the release of Electron 11.0.0-beta.1, the Electron team is now shipping builds of Electron that run on the new Apple Silicon hardware that Apple plans on shipping later this year. You can grab the latest beta with npm install electron@beta or download it directly from our releases website.

How does it work?

As of Electron 11, we will be shipping separate versions of Electron for Intel Macs and Apple Silicon Macs. Prior to this change, we were already shipping two artifacts, darwin-x64 and mas-x64, with the latter being for Mac App Store compatibility usage. We are now shipping another two artifacts, darwin-arm64 and mas-arm64, which are the Apple Silicon equivalents of the aforementioned artifacts.

What do I need to do?

You will need to ship two versions of your app: one for x64 (Intel Mac) and one for arm64 (Apple Silicon). The good news is that electron-packager, electron-rebuild and electron-forge already support targeting the arm64 architecture. As long as you're running the latest versions of those packages, your app should work flawlessly once you update the target architecture to arm64.

In the future, we will release a package that allows you to "merge" your arm64 and x64 apps into a single universal binary, but it's worth noting that this binary would be huge and probably isn't ideal for shipping to users.

Update: This package is now available at @electron/universal. You can use it to merge two packaged x64 and arm64 apps into a single binary.

Potential Issues

Native Modules

As you are targeting a new architecture, you'll need to update several dependencies which may cause build issues. The minimum version of certain dependencies are included below for your reference.

DependencyVersion Requirement
Xcode>=12.2
node-gyp>=7.1
electron-rebuild>=1.12
electron-packager>=15.1

As a result of these dependency version requirements, you may have to fix/update certain native modules. One thing of note is that the Xcode upgrade will introduce a new version of the macOS SDK, which may cause build failures for your native modules.

How do I test it?

Currently, Apple Silicon applications only run on Apple Silicon hardware, which isn't commercially available at the time of writing this blog post. If you have a Developer Transition Kit, you can test your application on that. Otherwise, you'll have to wait for the release of production Apple Silicon hardware to test if your application works.

What about Rosetta 2?

Rosetta 2 is Apple's latest iteration of their Rosetta technology, which allows you to run x64 Intel applications on their new arm64 Apple Silicon hardware. Although we believe that x64 Electron apps will run under Rosetta 2, there are some important things to note (and reasons why you should ship a native arm64 binary).

  • Your app's performance will be significantly degraded. Electron / V8 uses JIT compilation for JavaScript, and due to how Rosetta works, you will effectively be running JIT twice (once in V8 and once in Rosetta).
  • You lose the benefit of new technology in Apple Silicon, such as the increased memory page size.
  • 我们是否提到性能将显著 降级?

· 阅读时间:约 3 分钟

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


Hacktoberfest and Discord banner

Electron Community Discord Launch

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

Why a new Discord server?

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.

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.

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!

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!

Hacktoberfest 2020

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

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.

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

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!

· 阅读时间:约 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!

Notable Changes

Stack Changes

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

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

重大更改

  • 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

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

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

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. 暂定 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.


What is Season of Docs?

Season of Docs logo

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

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

我该如何参加?

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

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

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

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

引用