Electron 12.0.0
Electron 12.0.0 est disponible ! 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. Lisez la suite ci-dessous pour plus de détails !
La team Electron est excitée d'annoncer la sortie de Electron 12.0.0 ! Vous pouvez l'installer via npm install electron@latest
ou le télécharger depuis notre site officiel. Continuez de lire pour plus de détails sur cette version, et s'il vous plaît, partagez vos commentaires et remarques !
Changements notables
Changements de la Stack
- Chromium
89
- Node.js
14.16
- V8
8.9
Nouveautés de cette version
- 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 aWebContents
instance from the main process. #25464 - The default values of
contextIsolation
andworldSafeExecuteJavaScript
are nowtrue
. #27949 #27502
Voir les notes de version 12.0.0 pour une liste complète des nouvelles fonctionnalités et des modifications.
Changements majeurs avec rupture de compatibilité
- Déprécié le module
remote
. It is replaced by@electron/remote
. #25293- If you are currently using the
remote
module, we've written a guide to migrating to@electron/remote
here.
- If you are currently using the
- Changed the default value of
contextIsolation
totrue
. #27949 - Changed the default value of
worldSafeExecuteJavaScript
totrue
. #27502 - Changed the default of
crashReporter.start({ compress })
fromfalse
totrue
. #25288 - Removed Flash support: Chromium has removed support for Flash, which was also removed in Electron 12. See Chromium's Flash Roadmap for more details.
- Required SSE3 for Chrome on x86: Chromium has removed support for older x86 CPUs that do not meet a minimum of SSE3 (Streaming SIMD Extensions 3) support. This support was also removed in Electron 12.
Vous trouverez plus d’informations sur ces changements et les changements futurs sur la pagechangements de rupture prévus.
Changements d'API
- Added
webFrameMain
API: ThewebFrameMain
module can be used to look up frames across existingWebContents
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:BrowserWindow
API changes:- Ajout de l'API
BrowserWindow.isTabletMode()
. #25209 - Added
resized
(Windows/macOS) andmoved
(Windows) events toBrowserWindow
. #26216 - Added new
system-context-menu
event to allow preventing and overriding the system context menu. #25795 - Added
win.setTopBrowserView()
so thatBrowserView
s can be raised. #27713 - Added
webPreferences.preferredSizeMode
to allow sizing views according to their document's minimum size. #25874
- Ajout de l'API
contextBridge
API changes:- Allowed ContextBridge
exposeInMainWorld
method to expose non-object APIs. #26834
- Allowed ContextBridge
display
API changes:- Added
displayFrequency
property to theDisplay
object to allow getting information about the refresh rate on Windows. #26472
- Added
extensions
API changes:- Added support for some
chrome.management
APIs. #25098
- Added support for some
MenuItem
API changes:- Ajout de la prise en charge de l'affichage du menu de partage macOS. #25629
net
API changes:powerMonitor
API changes:session
API changes:- Ajout de l'option
allowFileAccess
à l'APIses.loadExtension()
. #27702 - Added
display-capture
API forsession.setPermissionRequestHandler
. #27696 - Ajout d'une option
disabledCipherSuites
àsession.setSSLConfig
. #25818 - Added
extension-loaded
,extension-unloaded
, andextension-ready
events tosession
. #25385 - Added
session.setSSLConfig()
to allow configuring SSL. #25461 - Added support for explicitly specifying
direct
,auto_detect
orsystem
modes insession.setProxy()
. #24937 - Added Serial API support. #25237
- Added APIs to enable/disable spell checker. #26276
- Ajout de l'option
shell
API changes:- Added a new asynchronous
shell.trashItem()
API, replacing the synchronousshell.moveItemToTrash()
. #25114
- Added a new asynchronous
webContents
API changes:- Added a small console hint to console to help debug renderer crashes. #25317
- Added
frame
andwebContents
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 deprecatenew-window
event. #24517
webFrame
API changes:- Added spellcheck API to renderer. #25060