Zum Hauptteil springen

WebView2 and Electron

· Die Lesezeit beträgt 6 min

Over the past weeks, we’ve received several questions about the differences between the new WebView2 and Electron.

Both teams have the expressed goal of making web-tech the best it can be on the Desktop, and a shared comprehensive comparison is being discussed.

Electron and WebView2 are fast-moving and constantly evolving projects. We have assembled a brief snapshot of similarities and differences between Electron and WebView2 as they exist today.


Architecture Overview

Electron and WebView2 both build from the Chromium source for rendering web content. Strictly speaking, WebView2 builds from the Edge source, but Edge is built using a fork of the Chromium source. Electron does not share any DLLs with Chrome. WebView2 binaries hard link against Edge (Stable channel as of Edge 90), so they share disk and some working set. See Evergreen distribution mode for more info.

Electron apps always bundle and distribute the exact version of Electron with which they were developed. WebView2 has two options in distribution. You can bundle the exact WebView2 library your application was developed with, or you can use a shared-runtime version that may already be present on the system. WebView2 provides tools for each approach, including a bootstrapping installer in case the shared runtime is missing. WebView2 is shipped inbox starting with Windows 11.

Applications that bundle their frameworks are responsible for updating those frameworks, including minor security releases. For apps using the shared WebView2 runtime, WebView2 has its own updater, similar to Chrome or Edge, that runs independent of your application. Updating the application's code or any of its other dependencies is still a responsibility for the developer, same as with Electron. Neither Electron nor WebView2 is managed by Windows Update.

Both Electron and WebView2 inherit Chromium’s multi-process architecture - namely, a single main process that communicates with one-or-more renderer processes. These processes are entirely separate from other applications running on the system. Every Electron application is a separate process tree, containing a root browser-process, some utility processes, and zero or more render processes. WebView2 apps that use the same user data folder (like a suite of apps would do), share non-renderer processes. WebView2 apps using different data folders do not share processes.

  • ElectronJS Process Model:

    ElectronJS Process Model Diagram

  • WebView2 Based Application Process Model:

    WebView2 Process Model Diagram

Read more about WebView2’s process model and Electron’s process model here.

Electron provides APIs for common desktop application needs such as menus, file system access, notifications, and more. WebView2 is a component meant to be integrated into an application framework such as WinForms, WPF, WinUI, or Win32. WebView2 does not provide operating system APIs outside the web standard via JavaScript.

Node.js is integrated into Electron. Electron applications may use any Node.js API, module, or node-native-addon from the renderer and main processes. A WebView2 application does not assume which language or framework the rest of your application is written in. Your JavaScript code must proxy any operating system access through the application-host process.

Electron strives to maintain compatibility with the web API, including APIs developed from the Fugu Project. We have a snapshot of Electron’s Fugu API compatibility. WebView2 maintains a similar list of API differences from Edge.

Electron has a configurable security model for web content, from full-access to full-sandbox. WebView2 content is always sandboxed. Electron has comprehensive security documentation on choosing your security model. WebView2 also has security best practices.

The Electron source is maintained and available on GitHub. Applications can modify can build their own brands of Electron. The WebView2 source is not available on GitHub.

Quick Summary:

ElectronWebView2
Build DependencyChromiumEdge
Source Available on GitHubJaNein
Shares Edge/Chrome DLLsNeinYes (as of Edge 90)
Shared Runtime Between ApplicationsNeinOptional
Application APIsJaNein
Node.jsJaNein
SandboxOptionalImmer
Requires an Application FrameworkNeinJa
Unterstützte PlattformenMac, Win, LinuxWin (Mac/Linux planned)
Process Sharing Between AppsNieOptional
Framework-Updates verwaltet vonAnwendungWebView2

Performance Discussion

When it comes to rendering your web content, we expect little performance difference between Electron, WebView2, and any other Chromium-based renderer. We created scaffolding for apps built using Electron, C++ + WebView2, and C# + WebView2 for those interested to investigate potential performance differences.

There are a few differences that come into play outside of rendering web content, and folks from Electron, WebView2, Edge, and others have expressed interest in working on a detailed comparison including PWAs.

Inter-Process Communication (IPC)

There is one difference we want to highlight immediately, as we believe it is often a performance consideration in Electron apps.

In Chromium, the browser process acts as an IPC broker between sandboxed renderers and the rest of the system. While Electron allows unsandboxed render processes, many apps choose to enable the sandbox for added security. WebView2 always has the sandbox enabled, so for most Electron and WebView2 apps IPC can impact overall performance.

Even though Electron and WebView2 have a similar process models, the underlying IPC differs. Communicating between JavaScript and C++ or C# requires marshalling, most commonly to a JSON string. JSON serialization/parsing is an expensive operation, and IPC-bottlenecks can negatively impact performance. Starting with Edge 93, WV2 will use CBOR for network events.

Electron supports direct IPC between any two processes via the MessagePorts API, which utilize the structured clone algorithm. Applications which leverage this can avoid paying the JSON-serialization tax when sending objects between processes.

Zusammenfassung

Electron and WebView2 have a number of differences, but don't expect much difference with respect to how they perform rendering web content. Ultimately, an app’s architecture and JavaScript libraries/frameworks have a larger impact on memory and performance than anything else because Chromium is Chromium regardless of where it is running.

Special thanks to the WebView2 team for reviewing this post, and ensuring we have an up-to-date view of the WebView2 architecture. They welcome any feedback on the project.

Neue Electron Veröffentlichungs-Kadenz

· Die Lesezeit beträgt 6 min

Ab September 2021 wird Electron alle 8 Wochen eine neue stabile Version veröffentlichen.


In 2019, Electron moved to a 12 week release cycle to match Chromium's 6 week release cycle. Recently, both Chrome and Microsoft announced changes that made us reconsider Electron's current release cadence:

  1. Chromium plans to release a new milestone every 4 weeks, starting with Chrome 94 on September 21st, 2021. This release cadence also adds a new Extended Stable option every 8 weeks, which will contain all updated security fixes.

  2. The Microsoft Store will require Chromium-based apps to be no older than within 2 major versions. As an example, if the latest released major version of Chromium is 85, any browser based on Chromium must be on at least Chromium version 83 or higher. This rule includes Electron apps.

Beginning in September 2021, Electron will release a new major stable version every 8 weeks, to match Chromium's 8 week Extended Stable releases.

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: Temporäre 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 für Veröffentlichungen

Unten ist unser aktueller Release-Zeitplan für 2021:

ElectronChromeAlpha VeröffentlichungenBeta-VeröffentlichungenStabile VeröffentlichungenStabiler Zyklus (Wochen)
E13M91-2021-Mar-052021-May-2512
E14M93-2021-May-262021-Aug-3114
E15M942021-Jul-202021-Sep-012021-Sep-219 (enthält 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.

Bedenken ausräumen

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.

Wir haben versucht, die folgenden Anliegen zu berücksichtigen:

❓ Warum überhaupt diese Änderung vornehmen? Warum nicht die 12 Wochen Kadenz behalten?

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.

❓ Wird es für zukünftige Electron-Versionen eine Alpha-Version geben?

Es gibt derzeit keine Pläne, eine dauerhafte Alpha-Version zu unterstützen. Diese Alpha ist nur für Electron 15 gedacht, um den Entwicklern bei der Aktualisierung in der verkürzten Release-Periode zu helfen.

❓ Wird Electron die Anzahl der unterstützten Versionen verlängern?

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 (Mai'21)E14 (Aug'21)E15 (Sep'21)E16 (Nov'21)E17 (Feb'22)E18 (Mär'22)E19 (Mai'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--

Fragen?

📨 Wenn du Fragen oder Bedenken hast, schreibe uns bitte eine E-Mail an info@electronjs.org oder treten sie unserem Discord bei. We know this is a change that will impact many apps and developers, and your feedback is very important to us. Wir möchten gern Ihre Meinung hören!

Electron 13.0.0

· Die Lesezeit beträgt 3 min

Electron 13.0.0 wurde veröffentlicht! Es enthält Upgrades zu Chromium 91 und V8 9.1. Wir haben mehrere API-Updates, Bugfixes und allgemeine Verbesserungen hinzugefügt. Lesen Sie unten für weitere Details!


Das Electron Team freut sich über die Veröffentlichung von Electron 13.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Version und teilen Sie bitte Ihr Feedback!

Bemerkenswerte Änderungen

Stack-Änderungen

Hervorgehobene 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

Eine vollständige Liste der neuen Funktionen und Änderungen finden Sie in den 13.0.0 Versionshinweise.

Breaking Changes

  • Der window.open() Parameter FrameName ist nicht mehr als Fenstertitel festgelegt. #27481
  • Changed session.setPermissionCheckHandler(handler) to allow for handler's first parameter, webContents to be null. #19903

Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

API-Änderungen

  • 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-menu event.#26788
  • Added support for registering Manifest V3 extension service workers.
  • Added ‘registration-completed’ event to ServiceWorkers. #27562

Entfernte/Veraltete Änderungen

Die folgenden APIs wurden entfernt oder sind jetzt veraltet:

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

  • Veraltete shell.moveItemToTrash() entfernt. #26723

  • Folgende veraltete APIs der BrowserWindow Erweiterung entfernt:

    • BrowserWindow.addExtension(path)
    • BrowserWindow.addDevToolsExtension(path)
    • BrowserWindow.removeExtension(name)
    • BrowserWindow.removeDevToolsExtension(name)
    • BrowserWindow.getExtensions()
    • BrowserWindow.getDevToolsExtensions()

    Verwenden Sie stattdessen die session API:

    • ses.loadExtension(path)
    • ses.removeExtension(extension_id)
    • ses.getAllExtensions()
  • Die folgenden systemPreferences Methoden wurden veraltet:

    • systemPreferences.isDarkMode()
    • systemPreferences.isInvertedColorScheme()
    • systemPreferences.isHighContrastColorScheme()

    Verwende stattdessen die folgenden nativeTheme Eigenschaften:

    • nativeTheme.shouldUseDarkColors
    • nativeTheme.shouldUseInvertedColorScheme
    • nativeTheme.shouldUseHighContrastColors

Ende der Unterstützung für 10.x.y

Electron 10.x.y hat das Ende der Unterstützung gemäß der -Unterstützungsrichtlinie des Projekts erreicht. 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. The tentative 14.0.0 schedule maps out key dates in the Electron 14.0 development life cycle. 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.

Electron 12.0.0

· Die Lesezeit beträgt 5 min

Electron 12.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 89, V8 8.9 und Node.js 14.16. Wir haben Änderungen am Remote-Modul, neue Standardwerte für contextIsolation, eine neue WebFrameMain API und allgemeine Verbesserungen hinzugefügt. Lesen Sie unten für weitere Details!


Das Electron-Team freut sich über die Veröffentlichung von Electron 12.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Version und teilen Sie bitte Ihr Feedback!

Bemerkenswerte Änderungen

Stack-Änderungen

Hervorgehobene 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

Eine vollständige Liste der neuen Funktionen und Änderungen finden Sie in den 12.0.0 Versionshinweise.

Breaking Changes

Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

API-Änderungen

  • 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-Änderungen:
    • 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-Änderungen:
    • 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-Änderungen:
    • allowFileAccess Option zur ses.loadExtension() API hinzugefügt. #27702
    • display-capture API für session.setPermissionRequestHandler hinzugefügt. #27696
    • disabledCipherSuites Option zu session.setSSLConfig hinzugefügt. #25818
    • Added extension-loaded, extension-unloaded, and extension-ready events to session. #25385
    • session.setSSLConfig() hinzugefügt, um SSL zu konfigurieren. #25461
    • Added support for explicitly specifying direct, auto_detect or system modes in session.setProxy(). #24937
    • Serial API Unterstützung hinzugefügt. #25237
    • APIs zum Aktivieren/Deaktivieren der Rechtschreibprüfung hinzugefügt. #26276
  • shell API-Änderungen:
    • Eine neue asynchrone shell.trashItem() API wurde hinzugefügt und ersetzt die synchrone shell.moveItemToTrash(). #25114
  • webContents API-Änderungen:
    • 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-Änderungen:
    • Rechtschreibprüfungs API zum Renderer hinzugefügt. #25060

Entfernte/Veraltete Änderungen

Die folgenden APIs wurden entfernt oder sind jetzt veraltet:

  • Das Modul remote wurde veraltet. Es wird durch @electron/remote ersetzt. #25293
  • Veraltete crashReporter APIs entfernt. #26709
  • Links zur Electron-Website wurden aus dem Standard-"Hilfe"-Menü in gepackten Apps entfernt. #25831

Ende der Unterstützung für 9.x.y

Electron 9.x.y hat das Ende der Unterstützung gemäß der Unterstützungsrichtlinien des Projekts erreicht. 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. Der vorläufige 13.0.0 Zeitplan legt Schlüsseldaten im Entwicklungslebenszyklus von Electron 13.0 fest. 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.

Electron 11.0.0

· Die Lesezeit beträgt 3 min

Electron 11.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 87, V8 8.7 und Node.js 12.18.3. Wir haben Unterstützung für Apple Silicon und allgemeine Verbesserungen hinzugefügt. Lesen Sie unten für weitere Details!


Das Electron-Team freut sich über die Veröffentlichung von Electron 11.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Der Release ist voll mit Upgrades, Fixes und neuer Unterstützung für Apples M1-Hardware.

Wir können nicht warten, was du mit ihnen baust! Lesen Sie weiter für Details zu dieser Version und teilen Sie bitte Ihr Feedback!

Bemerkenswerte Änderungen

Stack-Änderungen

Hervorgehobene Features

  • Unterstützung für Apple M1: Am 10. November kündigte Apple seine neuen M1-Chips an, die in der kommenden Hardware enthalten sein werden. Ab Electron 11 wird Electron separate Versionen von Electron für Intel Macs (x64) und Apples kommende M1 Hardware (arm64) liefern. Sie können hier mehr darüber erfahren, wie Sie Ihre Electron-App auf Apples M1-Hardware laufen lassen. #24545
  • V8 Absturznachricht und Standortinformation zum crashReport Parameter hinzugefügt. #24771
  • Verbesserte die Leistung des Versands von breiten Objekten über die Kontextbrücke. #24671

Eine vollständige Liste der neuen Funktionen und Änderungen finden Sie in den 11.0.0 Versionshinweise.

Breaking Changes

  • Experimentelle APIs entfernt: BrowserView.{fromId, fromWebContents, getAllViews} und id Eigenschaft von BrowserView. #23578

Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

API-Änderungen

  • app.getApplicationInfoForProtocol() API hinzugefügt, die detaillierte Informationen über die App liefert, die ein bestimmtes Protokoll behandelt. #24112
  • app.createThumbnailFromPath() API hinzugefügt, die ein Vorschaubild einer Datei mit dem Pfad einer Datei und einer maximalen Vorschaugröße zurückgibt. #24802
  • Added webContents.forcefullyCrashRenderer() to forcefully terminate a renderer process to assist with recovering a hung renderer. #25756

Ende der Unterstützung für 8.x.y

Electron 8.x.y hat das Ende der Unterstützung gemäß der Unterstützungsrichtlinien des Projekts erreicht. 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. The tentative 12.0.0 schedule maps out key dates in the Electron 12.0 development life cycle. 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

We started work to remove the remote module in Electron 9. We plan to remove the remote module itself in Electron 14.

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)

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 and follow this issue for full details, including the proposed timeline.

Apple Silicon Unterstützung

· Die Lesezeit beträgt 3 min

Welche Schritte sind erforderlich, um deine Electron-App nach der Veröffentlichung der Apple Silicon-Hardware auf dieser zum Laufen zu bringen?


Mit der Veröffentlichung von Electron 11.0.0-beta.1 liefert das Electron-Team eine Version, welche auf der neuen Apple Silicon-Hardware laufen wird, welche Ende dieses Jahres veröffentlicht werden wird. Du kannst die neueste Beta-Version entweder mit Einbindung durch npm install electron@beta oder direkt von unserer Webseite herunterladen.

Wie funktioniert das?

Ab Electron 11 werden wir für Intel Macs und Apple Silicon Macs verschiedene Versionen liefern. Vor dieser Änderung hatten wir bereits zwei Artefakte, darwin-x64 und mas-x64, geliefert, wobei Letzteres speziell für die Veröffentlichung auf dem Mac App Store ausgerichtet war. Nun liefern wir zwei weitere Artefakte, darwin-arm64 und mas-arm64, welche die entsprechenden Equivalente für Apple Silicon sind.

Was mich ich tun?

Du musst zwei Versionen deiner App veröffentlichen: eine für x64 (Intel Mac) und eine für arm64 (Apple Silicon). Die gute Nachricht ist, dass electron-packager, electron-rebuild und electron-forge bereits die arm64 -Architektur unterstützen. Solange Du die aktuellsten Versionen dieser Pakete verwendest, sollte Deine App, sobald Du die Zielarchitektur arm64 benutzt, einwandfrei funktionieren.

wir werden in Zukunft ein Paket veröffentlichen, wo du deine arm64 und x64 Apps zu einer Datei "zusammenführen" kannst. Diese Datei währe aber gigantisch und daher nicht ideal zur Veröffentlichung.

Update: Dieses Paket ist ab sofort unter @electron/universal verfügbar. Sie können es verwenden, um zwei gepackte x64 und arm64 Apps zu einem einzigen Binärprogramm zusammenzuführen.

Mögliche Probleme

Native Module

Da Sie auf eine neue Architektur abzielen, müssen Sie mehrere Abhängigkeiten aktualisieren, die zu Build-Problemen führen können. Die minimale Version bestimmter Abhängigkeiten ist unten für Ihre Referenz enthalten.

AbhängigkeitVersionsvoraussetzung
Xcode>=12.2.0
node-gyp>=7.1.0
electron-rebuild>=1.12.0
electron-packager>=15.1.0

Aufgrund dieser Abhängigkeitsversionsanforderungen müssen Sie unter Umständen bestimmte native Module reparieren/aktualisieren. Eine Anmerkung ist, dass das Xcode Upgrade eine neue Version der macOS SDK einführen wird, was zu Build-Fehlern für Ihre nativen Module führen kann.

Wie kann ich es testen?

Derzeit laufen die Anwendungen von Apple Silicon nur auf der Apple Silicon Hardware, die zum Zeitpunkt des Schreibens dieses Blogeintrags nicht kommerziell verfügbar ist. Wenn Sie ein Entwickler-Transition Kit haben, können Sie Ihre Anwendung darauf testen. Andernfalls müssen Sie auf die Veröffentlichung der Apple Silicon Hardware warten, um zu testen, ob Ihre Anwendung funktioniert.

Was ist mit Rosetta 2?

Rosetta 2 ist Apples neueste Iteration ihrer Rosetta Technologie, mit der Sie x64 Intel-Anwendungen auf ihrer neuen arm64 Apple Silicon Hardware ausführen können. Obwohl wir glauben, dass x64 Electron-Apps unter Rosetta 2 laufen werden, gibt es einige wichtige Dinge zu beachten (und Gründe, warum Sie ein natives arm64-Programm erstellen sollten).

  • Die Leistung Ihrer App wird erheblich beeinträchtigt. Electron / V8 verwendet JIT Kompilierung für JavaScript und aufgrund der Funktionsweise von Rosetta werden Sie effektiv JIT zweimal laufen lassen (einmal in V8 und einmal in Rosetta).
  • Sie verlieren den Vorteil neuer Technologien in Apple Silicon, wie zum Beispiel die erhöhte Speicherseitengröße.
  • Haben wir erwähnt, dass die Leistung signifikant beeinträchtigt sein wird?

Community Discord Server und Hacktoberfest

· Die Lesezeit beträgt 3 min

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!

Warum ein neuer 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? Komm mit uns chatten!

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

· Die Lesezeit beträgt 5 min

Electron 10.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 85, V8 8.5 und Node.js 12.16. Wir haben einige neue API-Integrationen und Verbesserungen hinzugefügt. Lesen Sie unten für weitere Details!


Das Electron-Team freut sich über die Veröffentlichung von Electron 10.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Der Release ist voll mit Upgrades, Korrekturen und neuen Features.

In der Version Electron 10 haben wir auch eine Änderung an unseren Release-Notizen vorgenommen. Um es einfacher zu machen, was in Electron 10 brandneu ist und was sich zwischen Electron 10 und früheren Versionen geändert haben könnte, haben wir nun auch Änderungen enthalten, die an Electron 10 eingeführt wurden, aber auf frühere Versionen zurückportiert wurden. Wir hoffen, dass dies es Apps einfacher macht, neue Funktionen und Fehlerbehebungen beim Upgrade von Electron zu finden.

Wir können nicht warten, was du mit ihnen baust! Lesen Sie weiter für Details zu dieser Version und teilen Sie bitte Ihr Feedback!

Bemerkenswerte Änderungen

Stack-Änderungen

Hervorgehobene 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

Eine vollständige Liste der neuen Funktionen und Änderungen finden Sie in den 10.0.0 Versionshinweisen.

Breaking Changes

  • Standardwert von enableRemoteModule auf false geändert. #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

Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

API-Änderungen

  • 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

Veraltete APIs

Die folgenden APIs sind jetzt veraltet oder entfernt:

  • Die veraltete currentlyLoggingPath Eigenschaft von netLog wurde entfernt. Zusätzlich gibt netLog.stopLogging den Pfad zur aufgezeichneten Log nicht mehr zurück. #22732
  • Deprecated uncompressed crash uploads in crashReporter. #23598

Ende der Unterstützung für 7.x.y

Electron 7.x.y hat das Ende der Unterstützung gemäß der Unterstützungsrichtlinien des Projekts erreicht. 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. 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.

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.

Electron becomes an OpenJS Foundation Impact Project

· Eine Minute Lesezeit

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.

Google Season of Docs

· Die Lesezeit beträgt 2 min

Electron ist stolz darauf, an der zweiten Auflage der Initiative "Season of Docs" von Google teilzunehmen die Mentoren von Open-Source-Organisationen mit technischen Autoren kombiniert, um die Projektdokumentation zu verbessern.


What is Season of Docs?

Season of Docs logo

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.

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?

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.

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

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!

References