メインコンテンツへ飛ぶ

Electron 38.0.0

· 読むのにかかる時間 1 分

Electron 38.0.0 がリリースされました! これには Chromium 140.0.7339.41、V8 14.0、Node 22.16.0 へのアップグレードが含まれています。


Electron チームは、Electron 38.0.0 のリリース発表にワクワクしています! You can install it with npm via npm install electron@latest or download it from our releases website. このリリースの詳細は続きをご覧ください。

何かフィードバックがあれば、BlueskyMastodon で共有したり、コミュニティの Discord に参加してみましょう! バグや機能の要望は Electron の Issue トラッカー で報告できます。

注目すべき変更

累積的変更

Electron 38 では、Chromium は 138.0.7204.35 から 140.0.7339.41 へ、Node は 22.16.0 から 22.18.0 へ、V8 は 13.8 から 14.0 へとアップグレードしています。

New Features and Improvements

  • システムアクセントカラーのカスタマイズと、アクティブなウィンドウの枠線の強調表示をサポートしました。 #47285 (及び 37)
  • macOS の process.getSystemMemoryInfo()fileBackedpurgeable フィールドを追加しました。 #48146 (及び 37)
  • macOS 上で起動時に Tray アイコンが位置を維持できるように、 guid コンストラクタオプションをサポートしました。 #48077 (及び 37)
  • frameToken から WebFrameMain を取得できるように、 WebFrameMain.fromFrameToken(processId, frameToken) を追加しました。 #47942
  • Windows と macOS に app.getRecentDocuments() のサポートを追加しました。 #47924 (及び 37)
  • アセットやリソースの場所を特定するために、内部的に DIR_ASSETS ではなく DIR_MODULE/DIR_EXE を使用するように変更し、app.getPath で要求できる名前として「assets」を追加しました。 #47950 (及び 37)
  • dialog.showMessageDialog が親ウィンドウを渡したときに、モニターの中心に誤ってウィンドウが表示される問題を修正しました。 #48215
  • macOS で loadURL を介して読み込まれた Web ページをユーザが操作できなかった問題を修正しました。 #47575

破壊的変更

Removed: macOS 11 support

macOS 11 (Big Sur) は Chromium でサポートされなくなりました。

Older versions of Electron will continue to run on Big Sur, but macOS 12 (Monterey) or later will be required to run Electron v38.0.0 and higher.

削除: ELECTRON_OZONE_PLATFORM_HINT 環境変数

The default value of the --ozone-plaftform flag changed to auto.

You should use the XDG_SESSION_TYPE=wayland environment variable instead to use Wayland.

削除: plugin-crashed イベント

The plugin-crashed event has been removed from webContents.

非推奨: webFrame.routingId プロパティ

The routingId property will be removed from webFrame objects.

You should use webFrame.frameToken instead.

非推奨: webFrame.findFrameByRoutingId(routingId)

The webFrame.findFrameByRoutingId(routingId) function will be removed.

You should use webFrame.findFrameByToken(frameToken) instead.

Google Summer of Code Concludes

Our two Google Summer of Code contributors have just completed their summer projects!

  • @nilayarya crafted a new Save/Restore Window State API in Electron core. The new APIs will provide a built-in, standardized way to handle window state persistence. See Nilay's original RFC at electron/rfcs#16.
  • @hitarth-gg put a lot of hard work into modernizing the long-dormant Devtron extension using Chrome Manifest V3 APIs. This project provides tooling for developers to debug IPC communication, track event listeners, and visualize module dependencies in their Electron applications.

Stay tuned for a more detailed blog post outlining their projects and the outcomes.

35.x.y サポートの終了

プロジェクトの サポートポリシー に則り、Electron 35.x.y はサポート終了を迎えました。 開発者とアプリケーションは新しいバージョンの Electron にアップグレードすることを推奨します。

E38 (Sep'25)E39 (Oct'25)E40 (Jan'26)
38.x.y39.x.y40.x.y
37.x.y38.x.y39.x.y
36.x.y37.x.y38.x.y

次回予告

短期的には、Chromium、Node、V8 といった Electron を構成する主要コンポーネントの開発に遅れないでチームが注力し続けるでしょう。

Electron の公開タイムラインはこちらで ご覧いただけます。

今後の変更についての詳細は、予定されている破壊的変更 のページをご覧ください。

Electron 37.0.0

· 読むのにかかる時間 1 分

Electron 37.0.0 がリリースされました! It includes upgrades to Chromium 138, V8 13.8, and Node 22.16.0.


Electron チームは、Electron 37.0.0 のリリース発表にワクワクしています! You can install it with npm via npm install electron@latest or download it from our releases website. このリリースの詳細は続きをご覧ください。

何かフィードバックがあれば、BlueskyMastodon で共有したり、コミュニティの Discord に参加してみましょう! バグや機能の要望は Electron の Issue トラッカー で報告できます。

注目すべき変更

Smooth Corners: Native CSS Squircles

An image showing different corner smoothing values (0%, 30%, 60%, and 100%) applied to rectangles, with 60% labeled as matching macOS style

Electron 37 introduces the custom -electron-corner-smoothing CSS property, which allows apps to create smoother rounded corners to match Apple's macOS design language. This feature originally landed in Electron 36, but we felt like it deserved a brighter spotlight.

Example with 100% Corner Smoothing

コード結果
.box {
width: 128px;
height: 128px;
border-radius: 24px;
-electron-corner-smoothing: 100%;
}

Unlike the standard border-radius property, which carves quarter-circle corners out of a rectangle, -electron-corner-smoothing smoothly transitions the curve into a squircle shape with a continuous perimeter.

You can adjust the smoothness using values from 0% to 100%, or use the system-ui value to match the operating system's style (60% on macOS and 0% otherwise). This design enhancement can be applied on borders, outlines, and shadows, giving your app a subtle layer of polish.

ヒント

Read more about Electron's squircle implementation in @clavin's RFC 0012. The document goes over the motivation and technical implementation in more detail.

The initial design drew inspiration from Figma's corner smoothing implementation. Read more about their own quest for smooth corners in "Desperately seeking squircles".

累積的変更

Electron 37 upgrades Chromium from 136.0.7103.48 to 138.0.7204.35, and V8 from 13.6 to 13.8.

Google Summer of Code Begins

Our two Google Summer of Code contributors have started the program's coding period!

  • @nilayarya is crafting a new Save/Restore Window State API in Electron core. The new APIs will provide a built-in, standardized way to handle window state persistence. See Nilay's in-progress RFC at electron/rfcs#16.
  • @hitarth-gg is hard at work modernizing the long-dormant Devtron extension using Chrome Manifest V3 APIs. This project will provide tooling for developers to debug IPC communication, track event listeners, and visualize module dependencies in their Electron applications.

It has been an exciting couple of weeks for our GSOC participants, so stay tuned for more updates!

New Features and Improvements

  • window.openinnerWidthinnerHeightオプションを追加しました。 #47039 (及び 35, 36)
  • Added before-mouse-event to allow intercepting and preventing mouse events in webContents. #47364 (及び 36)
  • Added scriptURL property to ServiceWorkerMain. #45863
  • Added sublabel functionality for menus on macOS >= 14.4. #47042 (及び 35, 36)
  • HIDDevice.collectionsのサポートの追加しました。 #47483 (及び 36)
  • --no-experimental-global-navigatorフラグのサポートを追加しました。 #47418 (及び 35, 36)
  • Linux X11でscreen.dipToScreenPoint(point)screen.screenToDipPoint(point)のサポートを追加しました。 #46895 (及び 35, 36)
  • Added support for menu item role palette and header on macOS. #47245
  • Added support for node option --experimental-network-inspection. #47031 (及び 35, 36)
  • Exposed win.isContentProtected() to allow developers to check window protection status. #47310 (及び 36)

破壊的変更

Utility Process unhandled rejection behavior change

Utility Processes will now warn with an error message when an unhandled rejection occurs instead of crashing the process.

To restore the previous behavior, you can use:

process.on('unhandledRejection', () => {
process.exit(1);
});

Behavior Changed: process.exit() kills utility process synchronously

Calling process.exit() in a utility process will now kill the utility process synchronously. This brings the behavior of process.exit() in line with Node.js behavior.

Please refer to the Node.js docs and PR #45690 to understand the potential implications of that, e.g., when calling console.log() before process.exit().

Behavior Changed: WebUSB and WebSerial Blocklist Support

WebUSB and Web Serial now support the WebUSB Blocklist and Web Serial Blocklist used by Chromium and outlined in their respective specifications.

To disable these, users can pass disable-usb-blocklist and disable-serial-blocklist as command line flags.

Removed: null value for session property in ProtocolResponse

This deprecated feature has been removed.

Previously, setting the ProtocolResponse.session property to null would create a random independent session. This is no longer supported.

Using single-purpose sessions here is discouraged due to overhead costs; however, old code that needs to preserve this behavior can emulate it by creating a random session with session.fromPartition(some_random_string) and then using it in ProtocolResponse.session.

Behavior Changed: BrowserWindow.IsVisibleOnAllWorkspaces() on Linux

BrowserWindow.IsVisibleOnAllWorkspaces() will now return false on Linux if the window is not currently visible.

34.x.y サポートの終了

プロジェクトの サポートポリシー に則り、Electron 34.x.y はサポート終了を迎えました。 開発者とアプリケーションは新しいバージョンの Electron にアップグレードすることを推奨します。

E37 (Jun'25)E38 (Aug'25)E39 (Oct'25)
37.x.y38.x.y39.x.y
36.x.y37.x.y38.x.y
35.x.y36.x.y37.x.y

次回予告

短期的には、Chromium、Node、V8 といった Electron を構成する主要コンポーネントの開発に遅れないでチームが注力し続けるでしょう。

Electron の公開タイムラインはこちらで ご覧いただけます。

今後の変更についての詳細は、予定されている破壊的変更 のページをご覧ください。

Electron 36.0.0

· 読むのにかかる時間 1 分

Electron 36.0.0 がリリースされました! It includes upgrades to Chromium 136, V8 13.6, and Node 22.14.0.


Electron チームは、Electron 36.0.0 のリリース発表にワクワクしています! You can install it with npm via npm install electron@latest or download it from our releases website. このリリースの詳細は続きをご覧ください。

何かフィードバックがあれば、BlueskyMastodon で共有したり、コミュニティの Discord に参加してみましょう! バグや機能の要望は Electron の Issue トラッカー で報告できます。

注目すべき変更

Writing Tools Support

In Electron 36, you can enable macOS system-level features like Writing Tools (spelling and grammar), Autofill, and Services menu items in your context menus. To do so, pass a WebFrameMain instance into the frame parameter for menu.popup().

import { BrowserWindow, Menu, WebFrameMain } from 'electron';

const currentWindow = BrowserWindow.getFocusedWindow();
const focusedFrame = currentWindow.webContents.focusedFrame;
const menu = Menu.buildFromTemplate([{ label: 'Copy', role: 'copy' }]);

menu.popup({
window: currentWindow,
frame: focusedFrame,
});

累積的変更

Electron 36 upgrades Chromium from 134.0.6998.23 to 136.0.7103.48, and V8 from 13.5 to 13.6.

New Features and Improvements

  • Added BrowserWindow.isSnapped() to indicate whether a given window has been arranged via Snap on Windows. #46226
  • Added WebContents.focusedFrame to get the focused frame.
  • Fixed WebContents.opener to specify potential null type. #45667
  • Added ffmpeg.dll to delay load configuration. #46173 (及び 34, 35)
  • Added nativeTheme.shouldUseDarkColorsForSystemIntegratedUI to distinguish system and app theme. #46598 (及び 35)
  • Added excludeUrls to webRequest filter and deprecated the use of empty arrays in urls property. #44692 (及び 35)
  • Added support for Autofill, Writing Tools and Services macOS level menu items in context menus via the new frame option in menu.popup. #46350
  • Added support for system-context-menu on Linux. #46399
  • Improved ASAR integrity checks on Windows. #46537
  • Improved performance of desktopCapturer.getSources when not requesting thumbnails on macOS. #46251 (及び 34, 35)
  • Removed 240 FPS limit when using shared texture OSR. #45669 (及び 35)

破壊的変更

Deprecated: NativeImage.getBitmap()

The NativeImage.getBitmap() function is now deprecated and documented as an alias for NativeImage.toBitmap(). The two functions both return a newly-allocated copy of the bitmap and are functionally equivalent.

Deprecated: Extension methods and events on session

session.loadExtension, session.removeExtension, session.getExtension, session.getAllExtensions, and the events extension-loaded, extension-unloaded, and extension-ready have all moved to the new Extensions object accessible via the session.extensions instance property.

Removed: quota type syncable in session.clearStorageData(options)

When calling session.clearStorageData(options), the options.quota type syncable is no longer supported because it has been removed from upstream Chromium.

Deprecated: quota property in session.clearStorageData(options)

When calling Session.clearStorageData(options), the options.quota property is deprecated. Since the syncable type was removed, there is only type left -- 'temporary' -- so specifying it is unnecessary.

Behavior Changed: GTK 4 is the default when running on GNOME

After an upstream change, GTK 4 is now the default when running on GNOME.

In rare cases, this may cause some applications or configurations to error with the following message:

Gtk-ERROR **: 11:30:38.382: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported

Affected users can work around this by specifying the gtk-version command-line flag:

$ electron --gtk-version=3   # or --gtk-version=2

The same can be done with the app.commandLine.appendSwitch function.

Behavior Changed: app.commandLine

app.commandLine will convert uppercases switches and arguments to lowercase.

app.commandLine was only meant to handle Chromium switches (which aren't case-sensitive) and switches passed via app.commandLine will not be passed down to any of the child processes.

If you were using app.commandLine to parse app-specific command line arguments, you should do this via process.argv.

33.x.y サポートの終了

プロジェクトの サポートポリシー に則り、Electron 33.x.y はサポート終了を迎えました。 開発者とアプリケーションは新しいバージョンの Electron にアップグレードすることを推奨します。

E36 (Apr'25)E37 (Jun'25)E38 (Aug'25)
36.x.y37.x.y38.x.y
35.x.y36.x.y37.x.y
34.x.y35.x.y36.x.y

次回予告

短期的には、Chromium、Node、V8 といった Electron を構成する主要コンポーネントの開発に遅れないでチームが注力し続けるでしょう。

Electron の公開タイムラインはこちらで ご覧いただけます。

今後の変更についての詳細は、予定されている破壊的変更 のページをご覧ください。

Electron 35.0.0

· 読むのにかかる時間 1 分

Electron 35.0.0 がリリースされました! It includes upgrades to Chromium 134.0.6998.44, V8 13.5, and Node 22.14.0.


Electron チームは、Electron 35.0.0 のリリース発表にワクワクしています! npm install electron@latest から npm でインストールするか、リリースウェブサイト からダウンロードできます。 このリリースの詳細は続きをご覧ください。

何かフィードバックがあれば、BlueskyMastodon で共有したり、コミュニティの Discord に参加してみましょう! バグや機能の要望は Electron の Issue トラッカー で報告できます。

注目すべき変更

Service Worker Preload Scripts for Improved Extensions Support

Originally proposed in RFC #8 by @samuelmaddock, Electron 35 adds the ability to attach a preload script to Service Workers. With Chrome's Manifest V3 Extensions routing a lot of work through extension service workers, this feature fills in a gap in Electron's support for modern Chrome extensions.

When registering a preload script programmatically at the Session level, you can now specifically apply it to Service Worker contexts with the ses.registerPreloadScript(script) API.

Main Process
// Add our preload realm script to the session.
session.defaultSession.registerPreloadScript({
// Our script should only run in service worker preload realms.
type: 'service-worker',
// The absolute path to the script.
script: path.join(__dirname, 'extension-sw-preload.js'),
});

Furthermore, IPC is now available between Service Workers and their attached preload scripts via the ServiceWorkerMain.ipc class. The preload script will still use the ipcRenderer module to communicate with its Service Worker. See the original RFC for more details.

This feature was preceded by many other changes that laid the groundwork for it:

  • #45329 redesigned the Session module's preload APIs to support registering and unregistering individual preload scripts.
  • #45229 added the experimental contextBridge.executeInMainWorld(executionScript) script to evaluate JavaScript in the main world over the context bridge.
  • #45341 added the ServiceWorkerMain class to interact with Service Workers in the main process.

累積的変更

Electron 35 では、Chromium は 132.0.6834.83 から 134.0.6998.44 へ、Node は 20.18.1 から 22.14.0 へ、V8 は 13.2 から 13.5 へとアップグレードしています。

新機能

  • Added NSPrefersDisplaySafeAreaCompatibilityMode = false to Info.plist to remove "Scale to fit below built-in camera." from app options. #45357 (Also in v34.1.0)
  • Added ServiceWorkerMain class to interact with service workers in the main process. #45341
    • Added running-status-changed event on ServiceWorkers to indicate when a service worker's running status has changed.
    • Added startWorkerForScope on ServiceWorkers to start a worker that may have been previously stopped.
  • Added experimental contextBridge.executeInMainWorld to safely execute code across world boundaries. #45330
  • Added frame to 'console-message' event. #43617
  • Added query-session-end event and improved session-end events on Windows. #44598
  • Added view.getVisible(). #45409
  • Added webContents.navigationHistory.restore(index, entries) API that allows restoration of navigation history. #45583
  • Added optional animation parameter to BrowserWindow.setVibrancy. #35987
  • Added permission support for document.executeCommand("paste"). #45471 (Also in v34.1.0)
  • Added support for roundedCorners BrowserWindow constructor option on Windows. #45740 (Also in v34.3.0)
  • Added support for service worker preload scripts. #45408
  • Support Portal's globalShortcuts. Electron must be run with --enable-features=GlobalShortcutsPortal in order to have the feature working. #45297

破壊的変更

Removed: isDefault and status properties on PrinterInfo

These properties have been removed from the PrinterInfo object because they have been removed from upstream Chromium.

Deprecated: getFromVersionID on session.serviceWorkers

The session.serviceWorkers.fromVersionID(versionId) API has been deprecated in favor of session.serviceWorkers.getInfoFromVersionID(versionId). This was changed to make it more clear which object is returned with the introduction of the session.serviceWorkers.getWorkerFromVersionID(versionId) API.

// Deprecated
session.serviceWorkers.fromVersionID(versionId);

// Replace with
session.serviceWorkers.getInfoFromVersionID(versionId);

Deprecated: setPreloads, getPreloads on Session

registerPreloadScript, unregisterPreloadScript, and getPreloadScripts are introduced as a replacement for the deprecated methods. These new APIs allow third-party libraries to register preload scripts without replacing existing scripts. Also, the new type option allows for additional preload targets beyond frame.

// Deprecated
session.setPreloads([path.join(__dirname, 'preload.js')]);

// Replace with:
session.registerPreloadScript({
type: 'frame',
id: 'app-preload',
filePath: path.join(__dirname, 'preload.js'),
});

Deprecated: level, message, line, and sourceId arguments in console-message event on WebContents

The console-message event on WebContents has been updated to provide details on the Event argument.

// Deprecated
webContents.on(
'console-message',
(event, level, message, line, sourceId) => {},
);

// Replace with:
webContents.on(
'console-message',
({ level, message, lineNumber, sourceId, frame }) => {},
);

Additionally, level is now a string with possible values of info, warning, error, and debug.

Behavior Changed: urls property of WebRequestFilter.

Previously, an empty urls array was interpreted as including all URLs. To explicitly include all URLs, developers should now use the <all_urls> pattern, which is a designated URL pattern that matches every possible URL. This change clarifies the intent and ensures more predictable behavior.

// Deprecated
const deprecatedFilter = {
urls: [],
};

// Replace with
const newFilter = {
urls: ['<all_urls>'],
};

Deprecated: systemPreferences.isAeroGlassEnabled()

The systemPreferences.isAeroGlassEnabled() function has been deprecated without replacement. It has been always returning true since Electron 23, which only supports Windows 10+, where DWM composition can no longer be disabled.

https://learn.microsoft.com/en-us/windows/win32/dwm/composition-ovw#disabling-dwm-composition-windows7-and-earlier

32.x.y サポートの終了

プロジェクトの サポートポリシー に則り、Electron 32.x.y はサポート終了を迎えました。 開発者とアプリケーションは新しいバージョンの Electron にアップグレードすることを推奨します。

E35 (Mar'25)E36 (Apr'25)E37 (Jun'25)
35.x.y36.x.y37.x.y
34.x.y35.x.y36.x.y
33.x.y34.x.y35.x.y

次回予告

短期的には、Chromium、Node、V8 といった Electron を構成する主要コンポーネントの開発に遅れないでチームが注力し続けるでしょう。

Electron の公開タイムラインはこちらで ご覧いただけます。

今後の変更についての詳細は、予定されている破壊的変更 のページをご覧ください。

Google Summer of Code 2025

· 読むのにかかる時間 1 分

Electron は Google Summer of Code (GSoC) 2025 のメンター組織として再び採用されました! Google Summer of Code は、オープンソースソフトウェア開発に新たな貢献者を呼び込むことに重点を置いた国際プログラムです。

詳細については、Google の Summer of Code のホームページ をご覧ください。

私たちについて

Electron は、ウェブ技術を用いたクロスプラットフォームのデスクトップアプリケーションを構築する JavaScript フレームワークです。 Electron フレームワークのコアは ChromiumNode.js で構築されたコンパイル済みバイナリ実行形式であり、主に C++ で書かれています。

Electron のコア リポジトリ以外では、Electron エコシステムをサポートするいくつかのプロジェクトを管理しています:

As a GSoC contributor, you will have the opportunity to collaborate with some of Electron’s core contributors on one of many projects under the github.com/electron umbrella.

応募する前に

If you aren’t very familiar with Electron, we would recommend you start by reading the documentation and trying out some of the examples in Electron Fiddle.

To learn more about distributing Electron apps, try creating a sample application with Electron Forge:

npm init electron-app@latest my-app

コードに少し慣れたら、Electron の Discord サーバー での会話にご参加ください。

info

If this is your first time participating in Google Summer of Code or if you’re new to open source in general, we recommend reading Google’s Contributor Guide before engaging with the community.

プロジェクトの貢献者

あなたが興味のあるプロジェクトのアイデアに関連するリポジトリを見てみることをお勧めします。 あなたの研究を行う一つの方法は、バグを報告したり、 既存の問題をトリアージしたり、プルリクエストを送信したりすることです。 そうすることはコードベースで実践的な練習をする効果的な方法ですが、提案の提出には必須ではありません。 よく検討された提案は、過去のコントリビューションを参照することなくコードへの理解度を実証できるものである必要があります。

Electronへの貢献を検討されている場合は、提案を提出する前に以下のヒントを参考にしてください。

  1. コントリビューションを送信する際は、わかりやすいイシューやプルリクエストの説明を記入してください。 Regardless of the code itself, putting effort into the written part of a contribution shows us that you can be an effective communicator in a collaborative environment.
  2. PRs are always welcome for open issues. You do not need to comment on an issue asking a maintainer if you can be assigned to it. Note that we still encourage you to discuss potential solutions on an issue if you need to refine an idea for a solution, but comments strictly asking if you can work on something are redundant and add noise to the issue tracker.
  3. Low-effort project contributions (e.g. invalid issue reports, trivial wording changes in a repo README, or minor stylistic changes to front-end code) will negatively impact your final proposal, as they take up limited maintainer time and do not provide any net benefit to the Electron project.
  4. While AI coding assistants can be an effective tool for debugging and understanding new concepts, we highly discourage contributions that are copy/pasted directly from AI-generated output. These often turn out to be of low quality, and it's often more effort for maintainers to clean up code generated from an LLM than for us to just reject a PR altogether.

Crafting your proposal

Electron との共同開発に興味を持てましたか? 最初に、準備されている7つのプロジェクトアイデア案をご覧ください。 リストにあるすべてのアイデアは、提案可能です。

リストにないユニークなアイデアをお持ちの場合には検討いたしましが、提案内容が詳細かつ十分に整理されていることを確認してください。 あまり自信がないのであれば、リストのアイデアに従うことをお勧めします。

応募には以下のものがあるとよいでしょう。

  • A detailed proposal outlining what you plan to achieve over the summer.
  • 開発者としての経歴。 履歴書がある場合は、コピーを添付してください。 それ以外の場合は、過去の技術経験についてお教えください。
    • 特定の分野での経験不足で不合格になることはありませんが、これはメンターがあなたを最も効果的にサポートし、サマープロジェクトが成功するよう計画を立てるのに役立ちます。

Electronアプリケーションの一部として提出する必要のある項目の詳細なガイドはこちらをご確認くださいGoogle Summer of Codeポータルに直接提案を送信する。 Proposals emailed to the Electron team will not be considered as final submissions.

For more guidance on your proposal, we recommend you follow the official Google Summer of Code proposal writing advice here.

Applications open on March 24th, 2025 and close on April 8th, 2025.

Past project proposals

📚 For GSoC 2024, @piotrpdev, worked on adding API History to the Electron core documentation. To see what Piotr worked on during his summer with Electron, read his report in the 2024 GSoC program archives.

🔐 For GSoC 2022, @aryanshridhar worked on enabling Context Isolation in Electron Fiddle. Aryan さんが夏に Electron で取り組んだことを確認したい方は、2022 GSoC プログラムのアーカイブ から彼のレポートを閲覧できます。

質問?

If you have questions we didn’t address in this blog post or inquiries about your proposal draft, please send us an email at summer-of-code@electronjs.org or check the GSoC FAQ. Please read our contributor guidance before emailing.

リソース

Electron 34.0.0

· 読むのにかかる時間 1 分

Electron 34.0.0 がリリースされました! これには Chromium 132.0.6834.83、V8 13.2、Node 20.18.1 へのアップグレードが含まれています。


Electron チームは、Electron 34.0.0 のリリース発表にワクワクしています! npm install electron@latest から npm でインストールするか、リリースウェブサイト からダウンロードできます。 このリリースの詳細は続きをご覧ください。

何かフィードバックがあれば、BlueskyMastodon で共有したり、コミュニティの Discord に参加してみましょう! バグや機能の要望は Electron の Issue トラッカー で報告できます。

注目すべき変更

HTTP 圧縮における共有辞書管理 API

HTTP 圧縮は、ブラウザがデータを受信する前に、Web サーバーによってデータを圧縮することを可能にします。 最新バージョンの Chromium は Brotli や Zstandard などの新しい圧縮アルゴリウムをサポートしており、テキストファイルに対して gzip などの従来方式よりも優れた性能を発揮します。

カスタム圧縮辞書は Brotli や Zstandard の圧縮効率をさらに向上させます。 詳細は共有辞書についてのChrome for Developers ブログをご覧ください。

@felixrieseberg#44950 に以下の API を追加し、セッションレベルで共有辞書を管理できるようになりました。

  • session.getSharedDictionaryUsageInfo()
  • session.getSharedDictionaryInfo(options)
  • session.clearSharedDictionaryCache()
  • session.clearSharedDictionaryCacheForIsolationKey(options)

応答しないレンダラーのJavaScriptコールスタック

レンダラープロセスが規定の時間以上ハングした場合、Electron の unresponsive イベントが発生します。 @samuelmaddock#44204 で追加した新しい webFrameMain.collectJavaScriptCallStack() API は、関連する WebFrameMain オブジェクト(webContnets.mainFrame)から JavaScript のコールスタックを収集できるようにします。

この API は、JavaScript イベントが長時間実行され、プロセスがハングした場合にフレームが応答しなくなる原因を特定するのに役立ちます。 詳細はクラッシュレポート API の Web 標準への提唱をご覧ください。

Main Process
const { app } = require('electron');

app.commandLine.appendSwitch(
'enable-features',
'DocumentPolicyIncludeJSCallStacksInCrashReports',
);

app.on('web-contents-created', (_, webContents) => {
webContents.on('unresponsive', async () => {
// 応答しないレンダラーの実行を中断し、コールスタックを収集する
const callStack = await webContents.mainFrame.collectJavaScriptCallStack();
console.log('Renderer unresponsive\n', callStack);
});
});

[! 注意] このAPIはヘッダーに 'Document-Policy': 'include-js-call-stacks-in-crash-reports' を追加して、有効化する必要があります。 詳しい情報は #45356 を参照してください。

累積的変更

Electron 34 では、130.0.6723.44 から 132.0.6834.83 へ、Node は 20.18.2 から 20.18.1 へ、V8 は 13.0 から 13.2 へとアップグレードしています。

新機能

  • Brotli または ZStandard を使用して圧縮効率を向上するための、共有辞書を管理する API を追加しました。 新しい session.getSharedDictionaryUsageInfo()session.getSharedDictionaryInfo(options)session.clearSharedDictionaryCache()session.clearSharedDictionaryCacheForIsolationKey(options) APIを追加しました。 #44950
  • WebFrameMain.collectJavaScriptCallStack() を追加し、応答しないレンダラーの JavaScript コールスタックにアクセスすることができるようになりました。 #44938
  • フレームのアンロード状態に WebFrameMain.detached を追加しました。
    • フレームが破棄されたかどうかを判断するために WebFrameMain.isDestroyed() が追加されました。
    • フレームのアンロード中に、WebFrameMain.fromId(processId, frameId) が与えられたパラメータと一致しないインスタンスを返すのを修正しました。 #43473
  • Added error event in utility process to support diagnostic reports on V8 fatal errors. #43774
  • 機能:GPUアクセラレーションによる共有テクスチャのオフスクリーンレンダリングを追加。 #42953

破壊的変更

動作変更: Windows では、全画面表示中にメニューバーが非表示になります。

これにより、Linux と同等の動作になります。 以前までは、Windows では全画面表示中にメニューバーが表示されていました。 これからは、Windows では全画面表示中にメニューバーが隠れます。

訂正: これは以前、Electron 33 で破壊的変更として記載されていましたが、Electron 34 で最初にリリースされました。

31.x.y サポートの終了

プロジェクトの サポートポリシー に則り、Electron 31.x.y はサポート終了を迎えました。 開発者とアプリケーションは新しいバージョンの Electron にアップグレードすることを推奨します。

E34 (2025 年 1 月)E35 (2025 年 4 月)E36 (2025 年 6 月)
34.x.y35.x.y36.x.y
33.x.y34.x.y35.x.y
32.x.y33.x.y34.x.y

次回予告

短期的には、Chromium、Node、V8 といった Electron を構成する主要コンポーネントの開発に遅れないでチームが注力し続けるでしょう。

Electron の公開タイムラインはこちらで ご覧いただけます。

今後の変更についての詳細は、予定されている破壊的変更 のページをご覧ください。

Moving our Ecosystem to Node 22

· 読むのにかかる時間 1 分

In early 2025, Electron’s npm ecosystem repos (under the @electron/ and @electron-forge/ namespaces) will move to Node.js 22 as the minimum supported version.


What does this mean?

In the past, packages in Electron’s npm ecosystem (Forge, Packager, etc) have supported Node versions for as long as possible, even after a version has reached its End-Of-Life (EOL) date. This is done to make sure we don’t fragment the ecosystem—we understand that many projects depend on older versions of Node, and we don’t want to risk stranding those projects unless there was a pressing reason to upgrade.

Over time, using Node.js 14 as our minimum version has become increasingly difficult for a few reasons:

  • Lack of official Node.js 14 macOS ARM64 builds requires us to maintain CI infrastructure workarounds to provide full test coverage.
  • engines requirements for upstream package dependencies have moved forward, making it increasingly difficult to resolve supply chain security issues with dependency bumps.

Additionally, newer versions of Node.js have included many improvements that we would like to leverage, such as runtime-native common utilities (e.g. fs.glob and util.parseArgs) and entire new batteries-included modules (e.g. node:test, node:sqlite).

Why upgrade now?

In July 2024, Electron’s Ecosystem Working Group decided to upgrade all packages to the earliest Node version where require()of synchronous ESM graphs will be supported (see nodejs/node#51977 and nodejs/node#53500) at a future point after that version reaches its LTS date.

We’ve decided to set that update time to January/February 2025. After this upgrade occurs, Node 22 will be the minimum supported version in existing ecosystem packages.

What action do I need to take?

We’ll strive to maintain compatibility as much as possible. However, to ensure the best support, we encourage you to upgrade your apps to Node 22 or higher.

Note that the Node version running in your project is unrelated to the Node version embedded into your current version of Electron.

今後の予定

Please feel free to write to us at info@electronjs.org if you have any questions or concerns. You can also find community support in our official Electron Discord.

12 月の安息月 (Dec'24)

· 読むのにかかる時間 1 分

Electron プロジェクトは 2024 年 12 月の 1 ヶ月間休止し、2025 年 1 月から全力に戻ります。

via GIPHY


12 月でも変わらないこと

  1. ゼロデイやその他の主要なセキュリティ関連のリリースは必要に応じて公開されます。 セキュリティインシデントは、SECURITY.md に則って報告してください。
  2. 行動規範 における通報とモデレーションは継続されます。

12 月で変わること

  1. 2024's last stable branch releases for the year, which include Electron 31, 32, and 33, will occur the week of December 1st. There will be no additional planned releases in December.
  2. 12 月の最後の 2 週間は、ナイトリーやアルファのリリースはありません。
  3. いくつかの例外を除いて、プルリクエストのレビューやマージはしません。
  4. どのリポジトリでも Issue トラッカーは更新されません。
  5. メンテナからの Discord デバッグのヘルプはありません。
  6. ソーシャルメディアコンテンツの更新はありません。

皆さん、2025 年にまたお会いしましょう!

Migrating from BrowserView to WebContentsView

· 読むのにかかる時間 1 分

BrowserView has been deprecated since Electron 30 and is replaced by WebContentView. Thankfully, migrating is fairly painless.


Electron is moving from BrowserView to WebContentsView to align with Chromium’s UI framework, the Views API. WebContentsView offers a reusable view directly tied to Chromium’s rendering pipeline, simplifying future upgrades and opening up the possibility for developers to integrate non-web UI elements to their Electron apps. By adopting WebContentsView, applications are not only prepared for upcoming updates but also benefit from reduced code complexity and fewer potential bugs in the long run.

Developers familiar with BrowserWindows and BrowserViews should note that BrowserWindow and WebContentsView are subclasses inheriting from the BaseWindow and View base classes, respectively. To fully understand the available instance variables and methods, be sure to consult the documentation for these base classes.

Migration steps

1. Upgrade Electron to 30.0.0 or higher

警告

Electron releases may contain breaking changes that affect your application. It’s a good idea to test and land the Electron upgrade on your app first before proceeding with the rest of this migration. A list of breaking changes for each Electron major version can be found here as well as in the release notes for each major version on the Electron Blog.

2. Familiarize yourself with where your application uses BrowserViews

One way to do this is to search your codebase for new BrowserView(. This should give you a sense for how your application is using BrowserViews and how many call sites need to be migrated.

ヒント

For the most part, each instance where your app instantiates new BrowserViews can be migrated in isolation from the others.

3. Migrate each usage of BrowserView

  1. Migrate the instantiation. This should be fairly straightforward because WebContentsView and BrowserView’s constructors have essentially the same shape. Both accept WebPreferences via the webPreferences param.

    - this.tabBar = new BrowserView({
    + this.tabBar = new WebContentsView({
    info

    By default, WebContentsView instantiates with a white background, while BrowserView instantiates with a transparent background. To get a transparent background in WebContentsView, set its background color to an RGBA hex value with an alpha (opaqueness) channel set to 00:

    + this.webContentsView.setBackgroundColor("#00000000");
  2. Migrate where the BrowserView gets added to its parent window.

    - this.browserWindow.addBrowserView(this.tabBar)
    + this.browserWindow.contentView.addChildView(this.tabBar);
  3. Migrate BrowserView instance method calls on the parent window.

    Old MethodNew Methodノート
    win.setBrowserViewwin.contentView.removeChildView + win.contentView.addChildView
    win.getBrowserViewwin.contentView.children
    win.removeBrowserViewwin.contentView.removeChildView
    win.setTopBrowserViewwin.contentView.addChildViewCalling addChildView on an existing view reorders it to the top.
    win.getBrowserViewswin.contentView.children
  4. Migrate the setAutoResize instance method to a resize listener.

    - this.browserView.setAutoResize({
    - vertical: true,
    - })

    + this.browserWindow.on('resize', () => {
    + if (!this.browserWindow || !this.webContentsView) {
    + return;
    + }
    + const bounds = this.browserWindow.getBounds();
    + this.webContentsView.setBounds({
    + x: 0,
    + y: 0,
    + width: bounds.width,
    + height: bounds.height,
    + });
    + });
    ヒント

    All existing usage of browserView.webContents and instance methods browserView.setBounds, browserView.getBounds , and browserView.setBackgroundColor do not need to be migrated and should work with a WebContentsView instance out of the box!

4) Test and commit your changes

Running into issues? Check the WebContentsView tag on Electron's issue tracker to see if the issue you're encountering has been reported. If you don't see your issue there, feel free to add a new bug report. Including testcase gists will help us better triage your issue!

Congrats, you’ve migrated onto WebContentsViews! 🎉

Electron 33.0.0

· 読むのにかかる時間 1 分

Electron 33.0.0 がリリースされました! これには Chromium 130.0.6723.44、V8 13.0、Node 20.18.0 へのアップグレードが含まれています。


Electron チームは、Electron 33.0.0 のリリース発表にワクワクしています! npm install electron@latest から npm でインストールするか、リリースウェブサイト からダウンロードできます。 このリリースの詳細は続きをご覧ください。

何かフィードバックがあれば、TwitterMastodon で共有したり、コミュニティの Discord に参加してみましょう! バグや機能の要望は Electron の Issue トラッカー で報告できます。

注目すべき変更

ハイライト

  • Added a handler, app.setClientCertRequestPasswordHandler(handler), to help unlock cryptographic devices when a PIN is needed. #41205
  • Extended navigationHistory API with 2 new functions for better history management. #42014
  • Improved native theme transparency checking. #42862

累積的変更

Electron 33 では、Chromium は 128.0.6613.36 から 130.0.6723.44 へ、Node は 20.16.0 から 20.18.0 へ、V8 は 12.8 から 13.0 へとアップグレードしています。

新機能

  • Added a handler, app.setClientCertRequestPasswordHandler(handler), to help unlock cryptographic devices when a PIN is needed. #41205
  • Added error event in utility process to support diagnostic reports on V8 fatal errors. #43997
  • Added View.setBorderRadius(radius) for customizing the border radius of views—with compatibility for WebContentsView. #42320
  • Extended navigationHistory API with 2 new functions for better history management. #42014

破壊的変更

削除: macOS 10.15 のサポート

macOS 10.15 (Catalina) は Chromium でサポートされなくなりました。

旧バージョンの Electron はこれらのオペレーティングシステムでも引き続き動作しますが、Electron v20.0.0 以降の動作には macOS 11 (High Sierra) 以降が必要です。

動作変更: ネイティブモジュールにC++20が必要になりました

上流における変更により、V8Node.js の両方が、最小バージョンとしてC++20を必要とするようになりました。 ネイティブのNodeモジュールを使用する開発者は、 --std=c++17 ではなく --std=c++20 でモジュールをビルドする必要があります。 gcc9 以下のバージョンで作成されたイメージは、コンパイルするには gcc10 への更新が必要になる場合があります。 詳細は#43555を参照してください。

動作変更: WindowsにおけるカスタムプロトコルURLの処理

Chromiumが「特別でないURL (Non-special URL)」をサポートのために変更を加えたため、Windowsファイルパスを使用するカスタムプロトコルURLは、非推奨となった protocol.registerFileProtocolBrowserWindow.loadURLWebContents.loadURL<webview>.loadURLbaseURLForDataURL プロパティでは正しく動作しなくなります。 protocol.handle もこれらのタイプのURLでは動作しませんが、これは元々そのように動作しているため、変更ではありません。

// 動作しない
protocol.registerFileProtocol('other', () => {
callback({ filePath: '/path/to/my/file' });
});

const mainWindow = new BrowserWindow();
mainWindow.loadURL(
'data:text/html,<script src="loaded-from-dataurl.js"></script>',
{ baseURLForDataURL: 'other://C:\\myapp' },
);
mainWindow.loadURL('other://C:\\myapp\\index.html');

// 代替案
const path = require('node:path');
const nodeUrl = require('node:url');
protocol.handle(other, (req) => {
const srcPath = 'C:\\myapp\\';
const reqURL = new URL(req.url);
return net.fetch(
nodeUrl.pathToFileURL(path.join(srcPath, reqURL.pathname)).toString(),
);
});

mainWindow.loadURL(
'data:text/html,<script src="loaded-from-dataurl.js"></script>',
{ baseURLForDataURL: 'other://' },
);
mainWindow.loadURL('other://index.html');

動作変更: applogin における webContents プロパティ

applogin イベントにおける webContents プロパティは、 ユーティリティプロセスrespondToAuthRequestsFromMainProcess オプションによってイベントがトリガーされたとき null が返るようになります。

非推奨: BrowserWindowConstructorOption.typetextured オプション

BrowserWindowConstructorOptionstype プロパティの textured オプションは非推奨となりました。代替となるオプションはありません。 このオプションはmacOSの NSWindowStyleMaskTexturedBackground スタイルマスクに依存していましたが、これは代替手段なく非推奨になりました。

非推奨: systemPreferences.accessibilityDisplayShouldReduceTransparency

systemPreferences.accessibilityDisplayShouldReduceTransparency プロパティは非推奨となり、新しい nativeTheme.prefersReducedTransparency が推奨されます。新しいものでは全く同じ情報を提供しながら、クロスプラットフォームで動作します。

// 非推奨
const shouldReduceTransparency =
systemPreferences.accessibilityDisplayShouldReduceTransparency;

// こちらで置き換えてください
const prefersReducedTransparency = nativeTheme.prefersReducedTransparency;

30.x.y サポートの終了

プロジェクトの サポートポリシー に則り、Electron 30.x.y はサポート終了を迎えました。 開発者とアプリケーションは新しいバージョンの Electron にアップグレードすることを推奨します。

E33 (2024 年 10 月)E34 (2025 年 1 月)E35 (2025 年 4 月)
33.x.y34.x.y35.x.y
32.x.y33.x.y34.x.y
31.x.y32.x.y33.x.y

次回予告

短期的には、Chromium、Node、V8 といった Electron を構成する主要コンポーネントの開発に遅れないでチームが注力し続けるでしょう。

Electron の公開タイムラインはこちらで ご覧いただけます。

今後の変更についての詳細は、予定されている破壊的変更 のページをご覧ください。