Electron 14.0.0
¡Electron 14.0.0 ha sido liberado! It includes upgrades to Chromium 93
and V8 9.3
. We've added several API updates, bug fixes, and general improvements. ¡Lea a continuación para más detalles!
El equipo de Electron esta emocionado de anunciar el lanzamiento de Electron 14.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
Electron Release Cadence Change
Beginning in September 2021 with Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here. Electron 15 will begin beta on September 1, 2021 and stable release will be on September 21, 2021. You can find Electron's public timeline here. Additionally, Electron will be changing supported versions from latest three versions to latest four versions until May 2022. See see our versioning document for more detailed information about versioning in Electron.
Stack Changes
- Chromium
93
- Node.js
14.17.0
- V8
9.3
Características Destacadas
- Default Changed:
nativeWindowOpen
now defaults totrue
. (see docs) - Child windows no longer inherit BrowserWindow construction options from their parents. #28550
- Added new
session.storagePath
API to get the path on disk for session-specific data. #28665 - Added
process.contextId
used by@electron/remote
. #28007 - Added experimental cookie encryption support behind an Electron Fuse. #29492
Vea la notas de lanzamiento 14.0.0 para la lista completa de nuevas características y cambios.
Restaurar archivos borrados
Below are breaking changes introduced in Electron 14. More information about these and future changes can be found on the Planned Breaking Changes page.
Eliminada: app.allowRendererProcessReuse
The app.allowRendererProcessReuse
property has been removed as part of our plan to more closely align with Chromium's process model for security, performance and maintainability.
Para información más detallada vea #18397.
Eliminado: Browser Window Affinity
The affinity
option when constructing a new BrowserWindow
has been removed as part of our plan to more closely align with Chromium's process model for security, performance and maintainability.
Para información más detallada vea #18397.
API modificada: window.open()
The optional parameter frameName
no longer sets the title of the window. This behavior now follows the specification described by the native documentation for the windowName
parameter.
If you were using this parameter to set the title of a window, you can instead use the win.setTitle(title)
method.
Eliminado: worldSafeExecuteJavaScript
worldSafeExecuteJavaScript
has been removed with no alternative. Please ensure your code works with this property enabled. It has been enabled by default since Electron 12.
Será afectado por este cambio si usted utliza webFrame.executeJavaScript
o webFrame.executeJavaScriptInIsolatedWorld
. Necesitará asegurase que los valores devueltos por cualquiera de esos métodos son soportados por Context Bridge API ya que estos métodos utilizan la misma semántica de paso de valores.
Valor por defecto modificado: nativeWindowOpen
por defecto a true
Antes de Electron 14, window.open
estaba relucido de usar BrowserWindowProxy
por defecto. This meant that window.open('about:blank')
did not work to open synchronously scriptable child windows, among other incompatibilities. nativeWindowOpen
is no longer experimental, and is now the default.
Ver a la documentación de window.open in Electron para más informacion.
Eliminado: BrowserWindowConstructorOptions que hereda desde las ventanas padres
Prior to Electron 14, windows opened with window.open
would inherit BrowserWindow constructor options such as transparent
and resizable
from their parent window. Beginning with Electron 14, this behavior has been removed and windows will not inherit any BrowserWindow constructor options from their parents.
Instead, explicitly set options for the new window with setWindowOpenHandler
:
webContents.setWindowOpenHandler((details) => {
return {
action: 'allow',
overrideBrowserWindowOptions: {
// ...
},
};
});
Eliminada: additionalFeatures
The deprecated additionalFeatures
property in the new-window
and did-create-window
events of WebContents has been removed. Since new-window
uses positional arguments, the argument is still present, but will always be the empty array []
. (Note: the new-window
event itself is already deprecated and has been replaced by setWindowOpenHandler
.) Bare keys in window features will now present as keys with the value true
in the options object.
// Removed in Electron 14
// Triggered by window.open('...', '', 'my-key')
webContents.on('did-create-window', (window, details) => {
if (details.additionalFeatures.includes('my-key')) {
// ...
}
});
// Replace with
webContents.on('did-create-window', (window, details) => {
if (details.options['my-key']) {
// ...
}
});
Eliminado: módulo remote
Deprecated in Electron 12, the remote
module has now been removed from Electron itself and extracted into a separate package, @electron/remote
. The @electron/remote
module bridges JavaScript objects from the main process to the renderer process. This lets you access main-process-only objects as if they were available in the renderer process. This is a direct replacement for the remote
module. See the module's readme for migration instructions and reference.
API Modificada
- Added
BrowserWindow.isFocusable()
method to determine whether a window is focusable. #28642 - Added
WebFrameMain.visibilityState
instance property. #28706 - Added
disposition
,referrer
andpostBody
to the details object passed to the window open handler registered withsetWindowOpenHandler
. #28518 - Added
process.contextId
used by@electron/remote
. #28007 - Added experimental cookie encryption support behind an Electron Fuse. #29492
- Added missing
resourceType
conversions forwebRequest
listener details:font
,ping
,cspReport
,media
,webSocket
. #30050 - Added new
session.storagePath
API to get the path on disk for session-specific data. #28665 - Added support for Windows Control Overlay on macOS. #29986
- Added support for directing Chromium logging to a file with
--log-file=.../path/to/file.log
. Also, it's now possible to enable logging from JavaScript by appending command-line switches during the first JS tick. #29963 - Added support for the des-ede3 cipher in node crypto. #27897
- Added a
ContextBridgeMutability
feature that allows context bridge objects to be mutated. #27348
Cambios Eliminado/Obsoletos
Las siguientes APIs han sido eliminadas o ahora están obsoletas:
- The
remote
module has been removed after being deprecated in Electron 12. #25734 - Child windows no longer inherit BrowserWindow construction options from their parents. #28550
- Removed deprecated
additionalFeatures
property fromnew-window
anddid-create-window
WebContents events. #28548 - Removed the deprecated
app.allowRendererProcessReuse
and BrowserWindowaffinity
options. #26874 - The
submitURL
option forcrashReporter.start
is no longer a required argument whenuploadToServer
is false. #28105
Fin de soporte para 11.x.y
Electron 11.x.y ha alcanzado el fin de soporte según la política de soporte del proyecto. 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.
For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes.