Electron 7.0.0 穩(wěn)定版正式發(fā)布了,Electron 是 GitHub 開發(fā)的跨平臺桌面應(yīng)用開發(fā)工具,支持使用 Web 技術(shù)開發(fā)桌面應(yīng)用,其基于 C++ 開發(fā),GUI 核心來自于 Chromium,而 JavaScript 引擎使用 V8。
此片更新內(nèi)容如下:
Notable Changes
Electron 的核心組件是 Chromium、Node.js 與 V8,按照國際慣例它一般都會與這些項目保持同步更新,以提供最新的 JavaScript 特性、性能改進(jìn)和安全修復(fù)。在此版本中這三者分別升級內(nèi)容如下:
Chromium 78.0.3905.1
New in 78
New in 77
Node.js12.8.1
Node 12.8.1 更新內(nèi)容
Node 12.8
Node 12.7
Node 12.6
Node 12.5
V87.8
V87.8更新內(nèi)容
V87.7
增加了 Windows on ARM(64位) 版本
為異步請求/響應(yīng)的 IPC 添加了 ipcRenderer.Invoke() 和 ipcMain.Handle()
添加了 nativeTheme API 來讀取和響應(yīng)操作系統(tǒng)主題和顏色方案的變化
切換到新的 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 上的本機(jī)接口(菜單、對話框等)現(xiàn)在自動匹配用戶機(jī)器上的暗模式設(shè)置
更新 electron 模塊以使用 @Electronics/get,支持Node 8
Electron.asar 文件不再存在
New Features
所有異步 webContent/
為 macOS 添加了always-on-top-changed
在 Netlog API 中添加captureMode 和 maxFileSize 選項
在 app.getAppMetrics() 輸出中添加了 creationTime/sandbox/IntegrityLevel
向 webContents.print() 回調(diào)函數(shù)中添加了failureReason 參數(shù),以區(qū)分成功、失敗和取消
為 BrowserView 添加了 getBalls() 方法
將 gpu-info-update 事件添加到 app 中,只要有 gpu 信息更新,就會發(fā)出 gpu-info 更新事件
在 app.getAppMetrics() 添加memory
添加process.getBlinkMemoryInfo()
在 webFrame/webContent/
將 zoom-changed 事件添加到 webContent 中
增加打印自定義選項
app.moveToApplicationsFold 添加了一個可選的沖突處理回調(diào)
支持 webFrame.sertCSS() 中的 CSSorigin
在 Windows 上支持 Tray API 的 mouse-move 事件
Windows上支持systemPreferences.isDarkMode() API
macOS上支持systemPreferences.isHighContrastColorScheme() API
啟用 W3CReporting API
macOS 上實現(xiàn)了 BrowserWindow.setFocable
在校驗和文件中添加 Windows on ARMnode 頭文件
另外此版本還有許多修復(fù)和屬性更改,更多詳情見發(fā)布說明。