Electron 2.0.0
经过四个多月的开发、八个 Beta 版本发布以及来自众多应用的分阶段部署的全球测试,Electron 2.0.0 现已从 electronjs.org 开始提供。
¥After more than four months of development, eight beta releases, and worldwide testing from many apps' staged rollouts, the release of Electron 2.0.0 is now available from electronjs.org.
发布流程
¥Release Process
从 2.0.0 开始,Electron 的版本将遵循 语义版本控制 选项。这意味着主要版本号的更新会更频繁,并且通常是 Chromium 的重大更新。补丁版本应该更稳定,因为它们只包含高优先级的错误修复。
¥Starting with 2.0.0, Electron's releases will follow semantic versioning. This means the major version will bump more often and will usually be a major update to Chromium. Patch releases should be more stable because they will contain only high-priority bug fixes.
Electron 2.0.0 也代表了 Electron 在主要版本发布前的稳定性改进。多个大型 Electron 应用已分阶段部署 2.0.0 测试版,为 Electron 的测试版系列提供了最佳的反馈循环。
¥Electron 2.0.0 also represents an improvement to how Electron is stabilized before a major release. Several large scale Electron apps have included 2.0.0 betas in staged rollouts, providing the best feedback loop Electron's ever had for a beta series.
变更/新功能
¥Changes / New Features
-
Electron 工具链的几个重要部分发生了重大变化,包括 Chrome 61、Node 8.9.3、V8 6.1.534.41、Linux 上的 GTK+ 3、更新的拼写检查器和 Squirrel。
¥Major bumps to several important parts of Electron's toolchain, including Chrome 61, Node 8.9.3, V8 6.1.534.41, GTK+ 3 on Linux, updated spellchecker, and Squirrel.
-
¥In-app purchases are now supported on MacOS. #11292
-
用于加载文件的新 API。#11565
¥New API for loading files. #11565
-
用于启用/禁用窗口的新 API。#11832
¥New API to enable/disable a window. #11832
-
新 API app.setLocale()。#11469
¥New API app.setLocale(). #11469
-
新增 IPC 消息日志记录支持。#11880
¥New support for logging IPC messages. #11880
-
新的菜单事件。#11754
¥New menu events. #11754
-
向 powerMonitor 添加
shutdown
事件。#11417¥Add a
shutdown
event to powerMonitor. #11417 -
添加
affinity
选项,用于将多个 BrowserWindows 聚合到单个进程中。#11501¥Add
affinity
option for gathering several BrowserWindows into a single process. #11501 -
为 saveDialog 添加列出可用扩展名的功能。#11873
¥Add the ability for saveDialog to list available extensions. #11873
-
支持额外的通知操作 #11647
¥Support for additional notification actions #11647
-
设置 macOS 通知关闭按钮标题的功能。#11654
¥The ability to set macOS notification close button title. #11654
-
为 menu.popup(window, callback) 添加条件语句。
¥Add conditional for menu.popup(window, callback)
-
触控栏项目的内存优化。#12527
¥Memory improvements in touchbar items. #12527
-
改进了安全建议清单。
¥Improved security recommendation checklist.
-
添加 App-Scoped Security 作用域书签。#11711
¥Add App-Scoped Security scoped bookmarks. #11711
-
添加了在渲染器进程中设置任意参数的功能。#11850
¥Add ability to set arbitrary arguments in a renderer process. #11850
-
为格式选择器添加附件视图。#11873
¥Add accessory view for format picker. #11873
-
修复了网络委托竞争条件问题。#12053
¥Fixed network delegate race condition. #12053
-
放弃对 Linux 上
mips64el
架构的支持。Electron 需要 C++14 工具链,但在发布时该架构尚不支持该工具链。我们希望将来能够重新提供支持。¥Drop support for the
mips64el
arch on Linux. Electron requires the C++14 toolchain, which was not available for that arch at the time of the release. We hope to re-add support in the future.
重大 API 更改
¥Breaking API changes
-
移除 已弃用的 API,包括:
¥Removed deprecated APIs, including:
-
更改了
menu.popup
签名。#11968¥Changed
menu.popup
signature. #11968 -
移除了已弃用的
crashReporter.setExtraParameter
和 #11972¥Removed deprecated
crashReporter.setExtraParameter
#11972 -
移除了已弃用的
webContents.setZoomLevelLimits
和webFrame.setZoomLevelLimits
。#11974¥Removed deprecated
webContents.setZoomLevelLimits
andwebFrame.setZoomLevelLimits
. #11974 -
移除了已弃用的
clipboard
方法。#11973¥Removed deprecated
clipboard
methods. #11973 -
移除了对
tray.setHighlightMode
布尔参数的支持。#11981¥Removed support for boolean parameters for
tray.setHighlightMode
. #11981
-
错误修复
¥Bug Fixes
-
已更改以确保
webContents.isOffscreen()
始终可用。#12531¥Changed to make sure
webContents.isOffscreen()
is always available. #12531 -
修复了 DevTools 取消停靠并获得焦点时
BrowserWindow.getFocusedWindow()
的问题。#12554¥Fixed
BrowserWindow.getFocusedWindow()
when DevTools is undocked and focused. #12554 -
修复了如果预加载路径包含特殊字符,则在沙盒渲染中预加载无法加载的问题。#12643
¥Fixed preload not loading in sandboxed render if preload path contains special chars. #12643
-
根据文档更正 allowRunningInsecureContent 的默认值。#12629
¥Correct the default of allowRunningInsecureContent as per docs. #12629
-
修复了 nativeImage 的透明度问题。#12683
¥Fixed transparency on nativeImage. #12683
-
修复了
Menu.buildFromTemplate
的问题。#12703¥Fixed issue with
Menu.buildFromTemplate
. #12703 -
已确认 menu.popup 选项是对象。#12330
¥Confirmed menu.popup options are objects. #12330
-
移除了新进程创建和上下文释放之间的竞争条件。#12361
¥Removed a race condition between new process creation and context release. #12361
-
更改浏览器视图时更新可拖动区域。#12370
¥Update draggable regions when changing BrowserView. #12370
-
修复了菜单栏切换按钮在焦点处检测 ALT 键的问题。#12235
¥Fixed menubar toggle alt key detection on focus. #12235
-
修复了 Web 视图中不正确的警告。#12236
¥Fixed incorrect warnings in webviews. #12236
-
修复了 'show' 选项从父窗口继承的问题。#122444
¥Fixed inheritance of 'show' option from parent windows. #122444
-
确保
getLastCrashReport()
确实是最后一个崩溃报告。#12255¥Ensure that
getLastCrashReport()
is actually the last crash report. #12255 -
修复了网络共享路径的依赖问题。#12287
¥Fixed require on network share path. #12287
-
修复了上下文菜单点击回调问题。#12170
¥Fixed context menu click callback. #12170
-
修复了弹出菜单的位置问题。#12181
¥Fixed popup menu position. #12181
-
改进了 libuv 循环清理。#11465
¥Improved libuv loop cleanup. #11465
-
修复了
hexColorDWORDToRGBA
的透明颜色问题。#11557¥Fixed
hexColorDWORDToRGBA
for transparent colors. #11557 -
修复了 getWebPreferences API 的空指针取消引用问题。#12245
¥Fixed null pointer dereference with getWebPreferences api. #12245
-
修复了菜单委托中的循环引用问题。#11967
¥Fixed a cyclic reference in menu delegate. #11967
-
修复了 net.request 的协议过滤问题。#11657
¥Fixed protocol filtering of net.request. #11657
-
WebFrame.setVisualZoomLevelLimits 现在设置用户代理缩放限制 #12510
¥WebFrame.setVisualZoomLevelLimits now sets user-agent scale constraints #12510
-
为 WebView 选项设置合适的默认值。#12292
¥Set appropriate defaults for webview options. #12292
-
修复了单例固件中的计时问题。
¥Fixed timing issue in singleton fixture.
-
修复了 NotifierSupportsActions() 中损坏的生产缓存问题。
¥Fixed broken production cache in NotifierSupportsActions()
-
使 MenuItem 角色兼容驼峰命名。#11532
¥Made MenuItem roles camelCase-compatible. #11532
-
移除了多余的菜单分隔符。#11827
¥Removed extra menu separators. #11827
-
修复了蓝牙选择器的错误。关闭 #11399。
¥Fixed Bluetooth chooser bug. Closes #11399.
-
修复了 macOS 全屏切换菜单项标签的问题。#11633
¥Fixed macos Full Screen Toggle menu item label. #11633
-
改进了窗口停用时工具提示的隐藏。#11644
¥Improved tooltip hiding when a window is deactivated. #11644
-
迁移已弃用的 web-view 方法。#11798
¥Migrated deprecated web-view method. #11798
-
修复了关闭从浏览器视图打开的窗口的问题。#11799
¥Fixed closing a window opened from a browserview. #11799
-
修复了蓝牙选择器的错误。#11492
¥Fixed Bluetooth chooser bug. #11492
-
更新了 app.getFileIcon API,使其使用任务调度程序。#11595
¥Updated to use task scheduler for app.getFileIcon API. #11595
-
更改为即使在离屏渲染时也会触发
console-message
事件。#11921¥Changed to fire
console-message
event even when rendering offscreen. #11921 -
修复了使用
WebContents.downloadURL
从自定义协议下载的问题。#11804¥Fixed downloading from custom protocols using
WebContents.downloadURL
. #11804 -
修复了透明窗口在 devtools 分离时失去透明度的问题。#11956
¥Fixed transparent windows losing transparency when devtools detaches. #11956
-
修复了 Electron 应用取消重启或关机的问题。#11625
¥Fixed Electron apps canceling restart or shutdown. #11625
苹果系统
¥macOS
-
修复了触控栏项目重用时事件泄漏的问题。#12624
¥Fixed event leak on reuse of touchbar item. #12624
-
修复了暗黑模式下托盘高亮的问题。#12398
¥Fixed tray highlight in darkmode. #12398
-
修复了异步对话框阻塞主进程的问题。#12407
¥Fixed blocking main process for async dialog. #12407
-
修复了
setTitle
托盘崩溃问题。#12356¥Fixed
setTitle
tray crash. #12356 -
修复了设置停靠菜单时崩溃的问题。#12087
¥Fixed crash when setting dock menu. #12087
Linux
-
更好的 Linux 桌面通知。#12229 #12216 #11965 #11980
¥Better Linux desktop notifications. #12229 #12216 #11965 #11980
-
菜单支持更好的 GTK+ 主题。#12331
¥Better GTK+ theme support for menus. #12331
-
在 Linux 上优雅退出。#12139
¥Exit gracefully on linux. #12139
-
使用应用名称作为托盘图标的默认工具提示。#12393
¥Use the app’s name as the tray icon's default tooltip. #12393
Windows
-
添加了 Visual Studio 2017 支持。#11656
¥Added Visual Studio 2017 support. #11656
-
修复了将异常传递给系统崩溃处理程序的问题。#12259
¥Fixed passing of exception to the system crash handler. #12259
-
修复了最小化窗口隐藏工具提示的问题。#11644
¥Fixed hiding tooltip from minimized window. #11644
-
修复了
desktopCapturer
以截取正确的屏幕。#11664¥Fixed
desktopCapturer
to capture the correct screen. #11664 -
修复了
disableHardwareAcceleration
的透明度问题。#11704¥Fixed
disableHardwareAcceleration
with transparency. #11704
下一步计划
¥What's Next
Electron 团队正在努力支持 Chromium、Node 和 v8 的新版本。3.0.0-beta.1 即将发布!
¥The Electron team is hard at work to support newer versions of Chromium, Node, and v8. Expect 3.0.0-beta.1 soon!