Electron 5.0.0 釋出
Electron 5.0.0 穩定版本釋出了。Electron 是 GitHub 釋出的跨平臺桌面應用開發工具,支援 Web 技術開發桌面應用,其基於 C++ 開發,GUI 核心來自於 Chromium,而 JavaScript 引擎使用 V8。
Electron 的核心是 Chromium、Node.js 與 V8,此版本這三者分別升級到了: Chromium 73.0.3683.119、Node.js 12.0.0 與 V8 7.3.492.27 。
更新亮點包括:
Electron 5 繼續踐行 Promise 化 ,將 Electron 中基於回撥的 API 轉換為 Promise。以下 API 在 Electron 5 中已被轉換:
- app.getFileIcon
- contentTracing.getCategories
- contentTracing.startRecording
- contentTracing.stopRecording
- debugger.sendCommand
- Cookies API
- shell.openExternal
- webContents.loadFile
- webContents.loadURL
- webContents.zoomLevel
- webContents.zoomFactor
- win.capturePage
systemPreferences 新增或改進了一些功能,用於獲取 macOS 系統顏色 :
- systemPreferences.getAccentColor
- systemPreferences.getColor
- systemPreferences.getSystemColor
添加了函式 process.getProcessMemoryInfo 以獲取有關 當前程序的記憶體使用情況 統計資訊。
為了提高 remote API 的安全性,添加了 新的遠端事件 ,以過濾 remote.getBuiltin、remote.getCurrentWindow、remote.getCurrentWebContents 與 <webview> .getWebContents。
BrowserWindow 現在支援在 同一個 BrowserWindow 中管理多個 BrowserView 。
完整更新內容檢視更新說明:
可以通過`npm install electron@latest`或以下連結下載該版本:
此外,根據版本支援計劃, Electron 2.0.X 已經 EOF ,官方不再對其提供支援。同時, 6.0.0 版本的釋出計劃 也已經出爐:
按照計劃,6.0.0 正式穩定版將於 7 月 18 日釋出。