Перейти к основному содержанию

Electron 13.0.0

· 3 мин. прочитано

Electron 13.0.0 вышел! It includes upgrades to Chromium 91 and V8 9.1. We've added several API updates, bug fixes, and general improvements. Read below for more details!

Команда Electron рада объявить о выпуске Electron 13.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. 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. Заменяется на 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-menu event.#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. Заменяется на 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.isvertedColorScheme()
    • 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.

Что дальше

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.