Electron 12.0.0
Electron 12.0.0 has been released! 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. Read below for more details!
The Electron team is excited to announce the release of Electron 12.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
- Chromium
89
- Node.js
14.16
- V8
8.9
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 aWebContents
instance from the main process. #25464 - The default values of
contextIsolation
andworldSafeExecuteJavaScript
are nowtrue
. #27949 #27502
See the 12.0.0 release notes for a full list of new features and changes.
Breaking Changes
- Deprecated the
remote
module. 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.
More information about these and future changes can be found on the Planned Breaking Changes page.
API Changes
- 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:- Added
BrowserWindow.isTabletMode()
API. #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
- Added
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:- Added support for showing macOS share menu. #25629
net
API changes:powerMonitor
API changes:session
API changes:- Added
allowFileAccess
option toses.loadExtension()
API. #27702 - Added
display-capture
API forsession.setPermissionRequestHandler
. #27696 - Added a
disabledCipherSuites
option tosession.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
- Added
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
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. The tentative 13.0.0 schedule maps out key dates in the Electron 13.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.