Electron 7.0.0稳定版正式发布:跨平台桌面应用开发工具

Electron 7.0.0 稳定版正式发布了,Electron 是 GitHub 开发的跨平台桌面应用开发工具,支持使用 Web 技术开发桌面应用,其基于 C++ 开发,GUI 核心来自于 Chromium,而 JavaScript 引擎使用 V8。


此片更新内容如下:

Notable Changes

Electron 的核心组件是 Chromium、Node.js 与 V8,按照国际惯例它一般都会与这些项目保持同步更新,以提供最新的 JavaScript 特性、性能改进和安全修复。在此版本中这三者分别升级内容如下:

Chromium 78.0.3905.1New in 78New in 77Node.js 12.8.1Node 12.8.1 更新内容Node 12.8Node 12.7Node 12.6Node 12.5V8 7.8V8 7.8 更新内容V8 7.7增加了 Windows on ARM(64位) 版本 为异步请求/响应的 IPC 添加了 ipcRenderer.Invoke() 和 ipcMain.Handle()添加了 nativeTheme API 来读取和响应操作系统主题和颜色方案的变化切换到新的 TypeScript Definitions 生成器,生成更加精确的定义

Breaking Changes

删除部分 API:Tray.setHighlightMode() (macOS)app.enableMixedSandbox() app.getApplicationMenu()app.setApplicationMenu()powerMonitor.querySystemIdleState()powerMonitor.querySystemIdleTime()webFrame.setIsolatedWorldContentSecurityPolicy()webFrame.setIsolatedWorldHumanReadableName()webFrame.setIsolatedWorldSecurityOrigin() Session.clearAuthCache() 不再过滤已清除的缓存条目 MacOS 上的本机接口(菜单、对话框等)现在自动匹配用户机器上的暗模式设置更新 electron 模块以使用 @Electronics/get,支持 Node 8Electron.asar 文件不再存在

New Features

所有异步 webContent/<webview> 方法现在返回一个 Promise/<webview>为 macOS 添加了 always-on-top-changed在 Netlog API 中添加 captureMode 和 maxFileSize 选项在 app.getAppMetrics() 输出中添加了 creationTime/sandbox/IntegrityLevel向 webContents.print() 回调函数中添加了 failureReason 参数,以区分成功、失败和取消为 BrowserView 添加了 getBalls() 方法将 gpu-info-update 事件添加到 app 中,只要有 gpu 信息更新,就会发出 gpu-info 更新事件在 app.getAppMetrics() 添加 memory添加 process.getBlinkMemoryInfo()在 webFrame/webContent/<webview> 中添加了 emoveInsertedCSS()/<webview>将 zoom-changed 事件添加到 webContent 中增加打印自定义选项app.moveToApplicationsFold 添加了一个可选的冲突处理回调支持 webFrame.sertCSS() 中的 CSS origin在 Windows 上支持 Tray API 的 mouse-move 事件Windows 上支持 systemPreferences.isDarkMode() APImacOS 上支持 systemPreferences.isHighContrastColorScheme() API启用 W3C Reporting APImacOS 上实现了 BrowserWindow.setFocable在校验和文件中添加 Windows on ARM node 头文件