WebView2 SDK 发行说明Release notes for WebView2 SDK

WebView2 团队将每六周更新一次WebView2 SDK。The WebView2 team updates the WebView2 SDK on a six-week cadence. 查看以下内容,了解有关产品公告、添加、修改和 API 的变更最新信息。Review the following content for up-to-date information on product announcements, additions, modifications, and breaking changes to the APIs.

备注

确保在更新 NuGet 程序包后重新编译应用。Ensure you re-compile your app after updating the NuGet package. WebView 团队建议在使用预发布程序包进行开发时使用 Canary 通道,在使用发布包时使用 Evergreen WebView2 Runtime。The WebView team recommends that you use the Canary channel when you develop using the prerelease packages, and the Evergreen WebView2 Runtime when you use the release packages. 有关详细信息,请导航到"匹配 WebView2 运行时版本"。For more information, navigate to Matching WebView2 Runtime versions.

备注

WebView2 Bug 修复特定于运行时或 SDK。WebView2 bug fixes are either Runtime or SDK specific.

1.0.865-prerelease1.0.865-prerelease

发布日期:2021 年 4 月 26 日Release Date: April 26, 2021

NuGet 包 |要加载的最低 Microsoft Edge 版本:86.0.616.0 或更高版本 |完整 API 兼容性:91.0.865.0 或更高版本NuGet package | Minimum Microsoft Edge version to load: 86.0.616.0 or newer | Full API Compatibility: 91.0.865.0 or newer

概要General

实验性功能Experimental Features

Bug 修复Bug fixes

  • 修复了 Chromium DevTools Protocol POST WebView2 中具有二进制数据的消息处理程序。Fixed handler for a Chromium DevTools Protocol message with POST binary data in WebView2.
  • 关闭下载 OpenSaveAsAwareness UI,因为它包含指向 的链接 edge://settingsTurned off the OpenSaveAsAwareness download UI, because it included links to edge://settings. \ (#1120) 。(#1120).
  • 从屏幕共享对话框中删除了品牌。Removed branding from screen share dialog. \ (#940) 。(#940).
  • 修复了当 SetWindowDisplayAffinity 函数在 WebView2 应用中停止屏幕捕获时,它使 WebView2 成为错误。Fixed bug where the SetWindowDisplayAffinity function broke WebView2 when it stopped screen capture in an WebView2 app. \ (#841) 。(#841).
  • 修复了将任何笔输入发送到 WebView2 时鼠标输入停止工作的合成托管 Bug。Fixed bug for composition hosting where mouse input stopped working if any pen input was sent to WebView2.
  • 修复了在任何笔输入后使鼠标输入中断的 Bug。Fixed bug that broke mouse input after any pen input. 此更改特定于运行时。This change is Runtime-specific.

.NET.NET

实验性功能Experimental Features

  • 向 WPF 工具箱添加了 WebView2 设计器工具。Added WebView2 designer tool to WPF Toolbox. \ (#210) 。(#210).
  • 在 .NET Designer 模式下添加了 WebView2 UI 元素。Added WebView2 UI element in .NET Designer Mode.

Bug 修复Bug fixes

  • 改进了 COM 异常描述,将每个异常包装在更详细的 .NET 异常中。Improved COM Exception descriptions by wrapping each in a more detailed .NET exception. \ (#338) 。(#338). 此更改特定于运行时。This change is Runtime-specific.
  • 修复了在选择切换焦点时导致 WebView2 控件在 tab Microsoft Visual Studio Tools for Office 中崩溃的 Bug。Fixed bug caused when you select tab to shift focus caused WebView2 control to crash in Microsoft Visual Studio Tools for Office. \ (#589#933) 。(#589 and #933). 此更改特定于运行时。This change is Runtime-specific.
  • 改进了 .NET framework 加载程序下层级别,更可靠。Improved .NET framework loader down level to be more robust. \ (#946) 。(#946).
  • 修复了在首次导航完成之前尝试刷新时导致崩溃的 Bug。Fixed bug that caused crash when you try to refresh before first navigation completed. \ (#1011) 。(#1011).
  • 修复了初始化,因此导航在 期间发生 CoreWebView2InitializationCompletedFixed initialization so navigation occurs during CoreWebView2InitializationCompleted. \ (#1050) 。(#1050).
  • 改进了 .NET 浏览器进程崩溃错误处理。Improved .NET browser process crash error handling. 现在可以在未发生崩溃的情况下处理 ProcessFailed 事件后重新创建控件。You may now recreate controls after you handle a ProcessFailed event without a crash. \ (#996) 。(#996).

1.0.818.411.0.818.41

发布日期:2021 年 4 月 21 日Release Date: April 21, 2021

NuGet 包 |要加载的最小运行时版本:86.0.616.0 或更高版本 |完整 API 兼容性:90.0.818.41 或更高版本NuGet package | Minimum Runtime version to load: 86.0.616.0 or newer | Full API Compatibility: 90.0.818.41 or newer

概要General

功能Features

  • 扩展 ProcessFailed 了事件。Extended the ProcessFailed event. 它现在针对非呈现器子进程和帧呈现器引发。It now raises for non-renderer child processes and frame renderers.
  • 添加了 iframeAddScriptToExecuteOnDocumentCreated 的元素支持。Added iframe element support for AddScriptToExecuteOnDocumentCreated.
  • 改进的 WebView2 代码可以更弹性地使用格式错误的版本信息 .exe 处理应用程序文件。Improved WebView2 code to be more resilient to .exe application files with malformatted version information. \ (#850) 。(#850).
  • 已从 --winhttp-proxy-resolver WebView 浏览器进程命令行中删除,为 WebView2 打开其他代理命令行选项。Removed --winhttp-proxy-resolver from WebView browser process command-line, turned on other proxy command-line options for WebView2.

1.0.824-prerelease1.0.824-prerelease

发布日期:2021 年 3 月 8 日Release Date: March 8, 2021

NuGet 包 |要加载的最低 Microsoft Edge 版本:86.0.616.0 或更高版本 |完整 API 兼容性:91.0.824.0 或更高版本NuGet package | Minimum Microsoft Edge version to load: 86.0.616.0 or newer | Full API Compatibility: 91.0.824.0 or newer

概要General

功能Features

  • 扩展 ProcessFailed 了事件。Extended the ProcessFailed event. 它现在针对非呈现器子进程和帧呈现器引发。It now raises for non-renderer child processes and frame renderers.
  • 添加了实验 性 AreBrowserAcceleratorKeysEnabled 设置。Added experimental AreBrowserAcceleratorKeysEnabled setting. 你可以阻止浏览器响应与导航、打印、保存和其他特定于浏览器的功能相关的键盘快捷方式。You may prevent the browser from responding to keyboard shortcuts related to navigation, printing, saving, and other browser-specific functions.
  • 添加了 iframeAddScriptToExecuteOnDocumentCreated 的元素支持。Added iframe element support for AddScriptToExecuteOnDocumentCreated.

促销Promotion

Bug 修复Bug fixes

  • 扩展支持的 C++ 和 .NET 项目类型,如 MFC 和 ATL。Expanded supported C++ and .NET project types such as MFC and ATL. \ (#506 、#669#851) 。(#506, #669, and #851).
  • 修复了 Evergreen WebView2 运行时泄露入站防火墙条目的 Bug。Fixed a bug that Evergreen WebView2 Runtime leaks Inbound firewall entry.
  • 修复了事件期间的响应 WebResourceRequested 设置。Fixed setting Response during WebResourceRequested event. \ (#568) 。(#568).
  • 修复了导航到导致 edge:// 浏览器进程退出的 Bug。Fixed a bug that navigating to edge:// causes browser process to exit. \ (#604) 。(#604).
  • 修复了在可视托管模式下将 WebView2 限制到屏幕大小的 Bug。Fixed a bug that limited WebView2 bounds to size of screen in Visual Hosting mode.

1.0.774.441.0.774.44

发布日期:2021 年 3 月 8 日Release Date: March 8, 2021

NuGet 包 |要加载的最小运行时版本:86.0.616.0 或更高版本 |完整 API 兼容性:89.0.774.44 或更高版本NuGet package | Minimum Runtime version to load: 86.0.616.0 or newer | Full API Compatibility: 89.0.774.44 or newer

概要General

功能Features

  • 在 WebView2 中已关闭各种 Microsoft Edge 浏览器服务。Turned off various Microsoft Edge browser services in WebView2.
  • 可视化托管 API 现已普遍可用。Visual Hosting APIs are now Generally Available.

促销Promotions

Bug 修复Bug fixes

  • 修复了在可视托管模式下将 WebView2 限制到屏幕大小的 Bug。Fixed a bug that limited WebView2 bounds to size of screen in Visual Hosting mode.

1.0.790-prerelease1.0.790-prerelease

发布日期:2021 年 2 月 10 日Release Date: February 10, 2021

NuGet包|Microsoft Edge版本 86.0.616.0 或更高版本NuGet package | Microsoft Edge version 86.0.616.0 or newer

概要General

重要

更改:WebView2预发布包 1.0.781 已弃用。Breaking Change: WebView2 pre-release package 1.0.781 is deprecated. 停止使用程序包 1.0.781 进行开发。Discontinue development with package 1.0.781.

重要

WebView2 预发布包 0.9.430 已弃用,并且随下一版本一起删除。WebView2 pre-release package 0.9.430 is deprecated, and is removed with the next release. 如果你的 WebView 应用使用程序包,WebView 团队建议你移动到较新的程序包。If your WebView app uses the package, the WebView team recommends that you move to a newer package.

功能Features

Bug 修复Bug fixes

  • 在 WebView2 Microsoft Edge"购物"功能。Turned off the Microsoft Edge Shopping feature in WebView2.
  • 在 为 时关闭 PDF 查看器中的上下文 AreDefaultContextMenusEnabled 菜单 falseTurned off the context menu in the PDF viewer when AreDefaultContextMenusEnabled is false. \ (#605) 。(#605).
  • 修复了在查询 时 E_NOINTERFACE 返回的 ICoreWebView2 ICoreWebView2Experimental Bug。Fixed a bug that returned E_NOINTERFACE when querying ICoreWebView2 for ICoreWebView2Experimental. \ (#691) 。(#691).
  • 修复了将 设置为 时允许使用格式错误的 URI CoreWebView2NavigationStartingEventArgs.Cancel 进行导航的 false bug。Fixed a bug that allowed navigation with malformed URIs when CoreWebView2NavigationStartingEventArgs.Cancel is set to false. \ (#400) 。(#400).
  • 修复了在弹出窗口中阻止的 Bug,并 window.print() 附带事件 NewWindowRequested 的事件处理程序。Fixed a bug that blocked window.print() on pop-up windows with event handlers attached to NewWindowRequested events. \ (#409) 。(#409).
  • 修复了在不同监视器之间移动应用时的动态 DPI 问题。Fixed Dynamic DPI issue when moving apps between different monitors. \ (#58) (#58)
  • 改进了 HRESULT ICoreWebView2WebResourceResponseViewGetContentCompletedHandler::Invoke传递的实例。Improved the HRESULT instances passed by ICoreWebView2WebResourceResponseViewGetContentCompletedHandler::Invoke.
  • 关闭自动填充管理按钮。Turned off autofill manage button. \ (#585) 。(#585).
  • 修复Visual Studio窗口托管时运行时 WebView2.Dispose 崩溃的问题。Fixed Visual Studio crashes while you run WebView2.Dispose when hosted in multiple windows. \ (#816) 和 #442) 。(#816) and #442).
  • 修复了在工具箱中显示 WebView2 Visual Studio Bug。Fixed bug to display WebView2 control in Visual Studio Toolbox. \ (#210) 。(#210).
  • 减少了高 CPU 使用率问题。Reduced high CPU usage issues. \ (#878) 。(#878).
  • 修复了已弃用 1.0.781-prerelease 程序包的问题。Fixed issues with deprecated 1.0.781-prerelease package. \ (#875#878) 。(#875 and #878).

促销Promotions

.NET.NET

Bug 修复Bug fixes

  • 修复了使用 WPF SDK 的 WebView 应用崩溃的错误。Fixed bug that crashed WebView apps that use the WPF SDK. 当你选择关闭窗口时 F4 发生崩溃。The crash occurred when you selected F4 to close a window. \ (#399) 。(#399).
  • WebView2 初始化屏幕现在是透明的,而不是灰色的。The WebView2 initialization screen is now transparent, instead of gray. \ (#196) 。(#196).

1.0.705.501.0.705.50

发布日期:2021 年 1 月 25 日Release Date: January 25, 2021

NuGet包|WebView2 运行时版本 86.0.616.0 或更高版本NuGet package | WebView2 Runtime version 86.0.616.0 or newer

概要General

促销Promotions

1.0.721-prerelease1.0.721-prerelease

发布日期:2020 年 12 月 8 日Release Date: December 8, 2020

NuGet包|Microsoft Edge版本 86.0.616.0 或更高版本NuGet package | Microsoft Edge version 86.0.616.0 or newer

概要General

重要

更改: 已弃用 WebView2 预发行版程序包 1.0.707 和程序包 0.9.628。Breaking Change: WebView2 pre-release package 1.0.707 and package 0.9.628 are deprecated. 停止使用程序包 1.0.707 和 package0.9.628 进行开发。Discontinue development with package 1.0.707 and package0.9.628.

功能Features

.NET.NET

功能Features

Bug 修复Bug fixes

  • 添加了 AcceleratorKeyPressed 事件以支持 AcceleratorKey 在 WebView2 中选择。Added AcceleratorKeyPressed event to support AcceleratorKey select in WebView2. \ (#288) 。(#288).
  • 删除了输出到 WebView2 文件夹的不必要的文件。Removed unnecessary files from being output to WebView2 folders. \ (#461) 。(#461).
  • 改进了主机对象 API。Improved host object API. \ (#335#525) 。(#335 and #525).

1.0.664.371.0.664.37

发布日期:2020 年 11 月 20 日Release Date: November 20, 2020

NuGet包|WebView2 运行时版本 86.0.616.0 或更高版本NuGet package | WebView2 Runtime version 86.0.616.0 or newer

概要General

重要

公告:.NET WPF/WinForms WebView2 SDK 现已正式发布 \ (GA) 。Announcement: .NET WPF/WinForms WebView2 SDKs are now Generally Available (GA). 从此版本开始,发布 SDK 是向前兼容的。Starting with this release, Release SDKs are forward-compatible. 有关详细信息,请导航到 GA 公告博客文章For more details, navigate to GA announcement blog post.

功能Features

  • .NET WPF/WinForms WebView2 现在是通用 \ (GA) 。.NET WPF/WinForms WebView2 is now Generally Available (GA).
  • 固定分发 \ (Bring-your-own) 模式达到 GA。Fixed Distribution (Bring-your-own) mode reached GA.

.NET.NET

Bug 修复Bug fixes

  • CoreWebView2NewWindowRequestedEventArgs.Handled 阻止打开新窗口。prevents new window from being opened. \ (#549#560) 。(#549 and #560).

1.0.674-prerelease1.0.674-prerelease

发布日期:2020 年 10 月 19 日Release Date: October 19, 2020

NuGet包|WebView2 运行时版本 86.0.616.0 或更高版本NuGet package | WebView2 Runtime version 86.0.616.0 or newer

概要General

.NET.NET

1.0.622.221.0.622.22

发布日期:2020 年 10 月 19 日Release Date: October 19, 2020

NuGet包|WebView2 运行时版本 86.0.616.0 或更高版本NuGet package | WebView2 Runtime version 86.0.616.0 or newer

概要General

重要

公告:Win32 C/C++ WebView2 现已正式发布 \ (GA) 。Announcement: Win32 C/C++ WebView2 is now Generally Available (GA). 从此版本开始,发布 SDK 是向前兼容的。Starting this release, Release SDKs are forward-compatible. 有关详细信息,请导航到 GA 公告博客文章For more information, navigate to GA announcement blog post.

0.9.622.110.9.622.11

发布日期:2020 年 9 月 10 日Release Date: September 10, 2020

NuGet包|WebView2 运行时版本 86.0.616.0 或更高版本NuGet package | WebView2 Runtime version 86.0.616.0 or newer

概要General

0.9.5790.9.579

发布日期:2020 年 7 月 20 日Release Date: July 20, 2020

NuGet包|Microsoft Edge版本 86.0.579.0。NuGet package | Microsoft Edge version 86.0.579.0.

概要General

  • 重要

    公告:Evergreen WebView2 运行时和安装程序发布了预览版。Announcement: Evergreen WebView2 Runtime and installer is released for preview. 有关详细信息,请导航到分发 WebView2For more information, navigate to Distribution of WebView2.

  • 重要

    通知:下一个 SDK 发布后,不再支持以下 WebView2 SDK 版本。Announcement: The following WebView2 SDK Versions are no longer supported after the next SDK release.

    WebView2 SDK 版本在发布时也标记为 nuget.org。 WebView2 建议使用最新版本的 WebView2 保持最新。The WebView2 SDK Versions are also marked deprecated on nuget.org. WebView2 recommends staying up to date with the latest version of WebView2.

  • 添加了 WebView 工作线程改进。Added WebView worker thread improvements. \ (#318) 。(#318).

  • 在 WebView 中关闭弹出窗口阻止程序。Turned off the popup blocker in WebView. 有关详细信息,请导航到事件的 IsUserInitiated NewWindowRequested 属性。For more information, navigate to the IsUserInitiated property in the NewWindowRequested event.

  • 确保为 运行 WebView 导航启动事件 about:blankEnsured WebView navigation starting event is run for about:blank. 现在 NavigationStarting ,所有导航都运行事件,但不支持和忽略元素的 取消 about:blank srcdoc iframeNow, NavigationStarting events are run for all navigation, but cancellations for about:blank or srcdoc of the iframe element aren't supported and ignored.

  • edge:// WebView 中阻止了某些 URI 方案。Blocked some edge:// URI schemes in WebView.

  • 在 WebView2 环境选项上添加了实验性 IsSingleSignOnUsingOSPrimaryAccountEnabled 属性,以打开 WebView 的条件访问。Added experimental IsSingleSignOnUsingOSPrimaryAccountEnabled property on WebView2 environment options to turn on conditional access for WebView.

  • 添加了实验 性 WebResourceResponseReceived 事件,该事件在 WebView 接收并处理来自 WebResource 请求的响应之后运行。Added experimental WebResourceResponseReceived event that runs after the WebView receives and processes the response from a WebResource request. 响应对象中包含身份验证标头(如果有)。Authentication headers, if any, are included in the response object.

.NET.NET

  • 改进了 WPF 焦点处理。Improved WPF focus handling. \ (#185) 。(#185).
  • ZoomFactor WPF Webview2 控制器上添加了 属性。Added ZoomFactor property on WPF Webview2 Controller.

0.9.5380.9.538

NuGet 包 |Microsoft Edge 版本 85.0.538.0。NuGet package | Microsoft Edge version 85.0.538.0.

概要General

  • 放弃对 WebView2 SDK 版本 0.8.149 的支持Dropping support for WebView2 SDK Version 0.8.149. WebView2 建议使用最新版本的 WebView2 保持最新。WebView2 recommends staying up to date with the latest version of WebView2.
  • 更新了组策略,以考虑何时修改 Microsoft Edge 浏览器的配置文件路径 (#179 ) 。Updated group policy to account for when the profile path of the Microsoft Edge browser is modified (#179).

Win32 C/C++Win32 C/C++

.NET (0.9.538 预发行) .NET (0.9.538 pre-release)

0.9.515-prerelease0.9.515-prerelease

NuGet 包 |Microsoft Edge 版本 84.0.515.0。NuGet package | Microsoft Edge version 84.0.515.0.

  • 重要

    公告:WebView2 现在支持预发布包中的 .NET Framework 4.6.2 或更高版本和 .NET Core 3.0 或更高版本上的 Windows 窗体 WPF。Announcement: WebView2 now supports Windows Forms and WPF on .NET Framework 4.6.2 or later and .NET Core 3.0 or later in the pre-release package.

  • 有关生成 WPF 应用的信息,请导航到 WPF 入门指南和适用于 WPF 特定 API 的 WebView2 WPF 参考。For more information about building WPF apps, navigate to the WPF Get Started Guide and the WebView2 WPF Reference for WPF-specific APIs.

  • 有关生成 Windows 窗体应用的信息,请导航到 Windows 窗体 入门指南和适用于 Windows 窗体特定 API 的 WebView2 Windows 窗体参考。For more information about building Windows Forms apps, navigate to the Windows Forms Get Started Guide and the WebView2 Windows Forms Reference for Windows Forms specific APIs.

  • 有关 CoreWebView2 API 详细信息,请导航到 .NET 参考For more information about the CoreWebView2 APIs, navigate to .NET Reference.

  • 注意

    已知问题:WebView 团队已注意到预发行版中在将来版本中要解决的一些问题。Known Issues: The WebView team is aware of some issues in the pre-release that are being resolved in future releases.

    • DPI 感知:WebView2 for WPF 当前无法感知 DPI。DPI Awareness: WebView2 for WPF is currently not DPI aware. 在高 DPI 监视器上初始化 WebView2 时,存在一个已知问题,即 WebView 最初初始化为窗口的一小部分,直到调整窗口大小。When initializing WebView2 on high DPI monitors, there is a known issue where the WebView at first initializes as a fraction of the window until the window is resized.
    • WPF 设计器:当前不支持 WPF 设计器。WPF Designer: The WPF designer is not currently supported. 在文本编辑器中直接修改相应的 XAML,在应用中添加 WebView2 控件。Add the WebView2 control in your app by directly modifying the appropriate XAML in a text editor.

0.9.4880.9.488

NuGet 包 |Microsoft Edge 版本 84.0.488.0。NuGet package | Microsoft Edge version 84.0.488.0.

0.9.4300.9.430

NuGet 包 |Microsoft Edge 版本 82.0.430.0。NuGet package | Microsoft Edge version 82.0.430.0.

WebView2 SDK 是官方 Win32 C++ Beta 版本,它包含了来自反馈的多项功能请求。The WebView2 SDK is the official Win32 C++ Beta version, which incorporates several feature requests from feedback. WebView 团队尝试通过发生重大变化来限制发布数量。The WebView team tries to limit the number of releases with breaking changes. 作为一般可用性方法,Beta 版本中将包含一些重大重大更改。As general availability approaches, several major breaking changes are incorporated in the Beta release.

  • 重要

    更改: 在最终版本接近最终发布时,WebView 团队将前缀重命名为 ,以确保 IWebView2WebView ICoreWebView2 WebView2 API 符合 Windows API 命名约定。Breaking Change: As the final release approaches the WebView team renamed the prefix IWebView2WebView to ICoreWebView2 in order to make sure the WebView2 API aligns with the Windows API naming convention. 此外,为了从 UI 框架利用 WebView2 SDK,WebView 团队分为 ICoreWebView2 ICoreWebView2ICoreWebView2HostAdditionally, in order to leverage the WebView2 SDK from UI frameworks, the WebView team separated ICoreWebView2 into ICoreWebView2 and ICoreWebView2Host. ICoreWebView2Host 支持调整大小、显示和隐藏、对焦以及与窗口和合成相关的其他功能。supports resizing, showing-and-hiding, focusing, and other functionality related to windowing and composition. ICoreWebView2 支持所有其他 WebView2 功能。ICoreWebView2 supports all other WebView2 functionality. 若要了解有关合并更改的信息,请导航到 WebView2 APISample 项目中的 WebView2 拉取请求。To learn more about incorporating the changes, navigate to the WebView2 pull request in the WebView2 APISample project.

  • 重要

    重大更改:将DocumentStateChanged拆分为三个组件:SourceChanged、ContentLoadingHistoryChangedBreaking Change: Split DocumentStateChanged into three components: SourceChanged, ContentLoading, and HistoryChanged. 现在,当源 URL 更改时 SourceChanged ,将运行事件。Now, when the source URL changes the SourceChanged event is run. 当历史记录状态更改时 HistoryChanged ,将运行事件。When the history state is changed the HistoryChanged event is run. 加载 ContentLoading 新文档时,该事件在初始脚本之前运行。The ContentLoading event is run before the initial script when a new document is being loaded.

  • 添加了对 ARM64 体系结构的支持。Added support for ARM64 architecture.

  • 添加了对触摸屏设备的软 () SIP\支持。Added Soft Input Panel (SIP) support for touch screen devices.

  • 增加了对 Windows Server 2008 R2、Windows Server 2012、Windows Server 2012 R2 和 Windows Server 2016 的支持。Added support for Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, and Windows Server 2016.

  • 添加了 NotifyParentWindowPositionChanged, 使状态栏在窗口模式下跟随窗口。Added NotifyParentWindowPositionChanged for the status bar to follow the window in windowed mode. 此外,在无窗口模式下实现更改,以便辅助功能正常工作。Also, implement the change in windowless mode in order for accessibility features to work.

  • 添加了 AreRemoteObjectsAllowed 设置以全局控制是否任何远程对象可以访问网页。Added AreRemoteObjectsAllowed setting to globally control whether a webpage may be accessed by any remote objects. 默认情况下,启用 ,因此 AreRemoteObjectsAllowed AddRemoteObject 添加的远程对象可从网页访问。By default, AreRemoteObjectsAllowed is turned on, so remote objects added by AddRemoteObject are accessible from the webpage. 关闭 AreRemoteObjectsAllowed 后,无法从网页访问对象。When AreRemoteObjectsAllowed is turned off, the objects aren't accessible from the webpage. 更改将应用于下一个导航事件。Changes are applied on the next navigation event.

  • 添加了IsZoomControlEnabled设置,以防止用户使用 和 \ (或 + 鼠标滚轮) 影响 WebView ctrl + + ctrl + - ctrl 的缩放。Added IsZoomControlEnabled setting to prevent users from impacting the zoom of the WebView using ctrl++ and ctrl+- (or ctrl+ mouse wheel). 当关闭该设置时 ,put_ZoomFactor 设置缩放。Zoom may still be set using put_ZoomFactor when the setting is turned off.

  • 将 ZoomFactor 更改为仅应用于当前 WebView。Changed ZoomFactor to only apply to the current WebView. 对当前 WebView 的缩放更改不会影响使用同一源网站导航到的其他 WebView。Zoom changes to the current WebView don't affect other WebViews that you navigated to using the same site of origin. 有关详细信息,请导航到"get_ZoomFactor"。For more information, navigate to get_ZoomFactor.

  • 适用于 WebView 的 Hid ZoomView UI \ (#95) 。Hid ZoomView UI for WebView (#95).

  • 添加了 SetBoundsAndZoomFactorAdded SetBoundsAndZoomFactor. 现在,你可以同时设置 WebView 的缩放系数和边界。Now, you may set the zoom factor and bounds of a WebView at the same time.

  • 添加了 WindowCloseRequested 事件。Added WindowCloseRequested event. 有关详细信息,请导航到 add_WindowCloseRequested \ (#119) 。For more information, navigate to add_WindowCloseRequested (#119).

  • 添加了对 beforeunload JavaScript 对话框事件对话框类型的支持,并添加了CORE_WEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD枚举条目。Added support for the beforeunload dialog type for JavaScript dialog events and added CORE_WEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD enum entry.

  • 向 HttpRequestHeaders 添加了 GetHeaders,GetHeader 添加到 HttpResponseHeaders,将 get_HasCurrentHeader 属性添加到 HttpHeadersCollectionIterator。Added GetHeaders to HttpRequestHeaders, GetHeader to HttpResponseHeaders, and get_HasCurrentHeader property to HttpHeadersCollectionIterator.

  • 重要

    中断更改:已修改 DevToolsProtocolEventReceived 的行为。Breaking Change: Modified DevToolsProtocolEventReceived behavior. 现在,你可以为特定的DevTools 协议事件创建 DevToolsProtocolEventReceiver,然后使用 add_DevToolsProtocolEventReceived remove_DevToolsProtocolEventReceived订阅/ / 取消订阅此类事件Now, you may create a DevToolsProtocolEventReceiver for a particular DevTools Protocol event and subscribe/unsubscribe to such event using add_DevToolsProtocolEventReceived/remove_DevToolsProtocolEventReceived.

  • 重要

    Breaking Change: Changed WebMessageReceivedEventArgs get_WebMessageAsString property to a TryGetWebMessageAsString method.Breaking Change: Changed WebMessageReceivedEventArgs get_WebMessageAsString property to a TryGetWebMessageAsString method.

  • 重要

    Breaking Change: Changed AcceleratorKeyPressedEventArgs Handle method to a get_Handled property.Breaking Change: Changed AcceleratorKeyPressedEventArgs Handle method to a get_Handled property.

0.8.3550.8.355

NuGet包|Microsoft Edge版本 80.0.355.0。NuGet package | Microsoft Edge version 80.0.355.0.

  • 发布的 WebView2API 示例,WebView2 SDK 的全面指南。Released WebView2API Sample, a comprehensive guide of the WebView2 SDK. 有关详细信息,请导航到"API 示例"。For more information, navigate to API Sample.
  • 添加了对英语 \ (#30 ) 之外的所有语言的 IME 支持。Added IME support for all languages besides English (#30).
  • 更新了事件的 API WebResourceRequested 图面以响应 Bug 报告。Updated the API surface of the WebResourceRequested event in response to bug reports. 现在,已弃用创建时同时指定筛选器和事件。Simultaneously specifying a filter and an event on creation is now deprecated. 若要创建 Web 资源请求的事件,add_WebResourceRequested添加事件,使用AddWebResourceRequestedFilter添加筛选器。To create a web resource requested event, use add_WebResourceRequested to add the event and AddWebResourceRequestedFilter to add a filter. RemoveWebResourceRequestedFilter将删除 \ (#36 ) \ (#74 ) 。RemoveWebResourceRequestedFilter removes the filter (#36) (#74).
  • 重要

    中断更改:已修改全屏行为。Breaking Change: Modified fullscreen behavior. 已弃用 IsFullScreenAllowedDeprecated IsFullScreenAllowed. 现在,默认情况下,如果 WebView \ ((如 video) )中的元素设置为全屏,它将填充 WebView 边界。Now, by default, if an element in a WebView (such as a video) is set to full screen, it fills the bounds of the WebView. 使用ContainsFullScreenElementChanged事件和 get_ContainsFullScreenElement 指定当元素要进入全屏模式时应用应如何调整 WebView 的大小。Use the ContainsFullScreenElementChanged event and get_ContainsFullScreenElement to specify how the app should resize the WebView if an element wants to enter fullscreen mode.

0.8.3140.8.314

NuGet包|Microsoft Edge版本 80.0.314.0。NuGet package | Microsoft Edge version 80.0.314.0.

  • 增加了对 Windows 7、Windows 8 和 Windows 8.1 的支持。Added support for Windows 7, Windows 8, and Windows 8.1.

  • 添加了 Visual Studio 和 Visual Studio Code 对 WebView2 的调试支持。Added Visual Studio and Visual Studio Code debug support for WebView2. 现在,从 IDE 在 WebView2 中调试脚本。Now, debug your script in the WebView2 right from your IDE. 有关详细信息,请导航到 如何使用 WebView2 控件进行开发时进行调试For more information, navigate to How to debug when developing with WebView2 controls.

  • 为 WebView2 中正在运行的脚本添加了 ,用于从应用的 Win32 组件访问 IDispatch 对象并访问 Native Object Injection IDispatch 对象的属性。Added Native Object Injection for the running script in WebView2 to access an IDispatch object from the Win32 component of the app and access the properties of the IDispatch object. 有关详细信息,请导航到 AddRemoteObject \ (#17) 。For more information, navigate to AddRemoteObject (#17).

  • 添加了 AcceleratorKeyPressed event。Added AcceleratorKeyPressed event. 有关详细信息,请导航到 add_AcceleratorKeyPressed \ (#57) 。For more information, navigate to add_AcceleratorKeyPressed (#57).

  • 已关闭 Context MenusTurned off the Context Menus. 有关详细信息,请导航到 \put_AreDefaultContextMenusEnabled \ (#57) 。For more information, navigate to put_AreDefaultContextMenusEnabled (#57).

  • DPI Awareness 更新 。Updated DPI Awareness. 现在,WebView 的 DPI 感知与主机应用的 DPI 感知相同。Now, the DPI awareness of WebView is the same as the DPI awareness of the host app.

    备注

    如果启动另一个混合应用时 DPI 感知不同于原始 WebView,则新 WebView 不会启动(如果 user data folder 相同 \ (#1 ) )。If another hybrid app is launched with a different DPI Awareness than the original WebView, the new WebView is not launched if the user data folder is the same (#1).

  • 进行了更新,以便 WebView2 自动拒绝 WebView 中托管的 Web 内容所提示的通知 Notification Change Behavior 权限请求。Updated Notification Change Behavior so WebView2 automatically rejects notification permission requests prompted by web content hosted in the WebView.

0.8.2700.8.270

NuGet包|Microsoft Edge 78.0.270.0 版。NuGet package | Microsoft Edge version 78.0.270.0.

  • 添加了 DocumentTitleChanged 事件以指示文档标题更改 \ (#27) 。Added DocumentTitleChanged event to indicate document title change (#27).
  • 添加了 GetWebView2BrowserVersionInfo API \ (#18) 。Added GetWebView2BrowserVersionInfo API (#18).
  • 添加了 NewWindowRequested event。Added NewWindowRequested event.
  • 更新 CreateWebView2EnvironmentWithDetails 了 函数以删除 releaseChannelPreferenceUpdated CreateWebView2EnvironmentWithDetails function to remove releaseChannelPreference. 有关 函数详细信息 CreateWebView2EnvironmentWithDetails ,请导航到 CreateWebView2EnvironmentWithDetailsFor more information about the CreateWebView2EnvironmentWithDetails function, navigate to CreateWebView2EnvironmentWithDetails. 仍然支持注册表和环境变量替代。The registry and environment variable override is still supported. 除非重写,否则使用默认通道首选项。The default channel preference is used unless overridden.
    在频道搜索期间,WebView 团队将跳过任何与 WebView2 SDK 不兼容的以前频道版本。During the channel search, the WebView team skips any previous channel version that isn't compatible with the WebView2 SDK.
    WebView 团队选择更稳定的渠道,以确保最终用户的行为最一致。The WebView team selects the more stable channel to ensure the most consistent behaviors for the end user. 使用最新的 Canary 版本进行测试时,应在启动应用之前创建一个脚本,将环境变量 WEBVIEW2_RELEASE_CHANNEL_PREFERENCE 1 设置为 。When you test with latest Canary builds, you should create a script to set the WEBVIEW2_RELEASE_CHANNEL_PREFERENCE environment variable to 1 before launching the app.
  • 使用 CreateWebView2EnvironmentWithDetails 逻辑更新了函数,以选择 userDataFolder 未指定时。Updated the CreateWebView2EnvironmentWithDetails function with logic for selecting userDataFolder when not specified. 有关 函数详细信息 CreateWebView2EnvironmentWithDetails ,请导航到 CreateWebView2EnvironmentWithDetailsFor more information about the CreateWebView2EnvironmentWithDetails function, navigate to CreateWebView2EnvironmentWithDetails. 如果您之前使用默认位置,则切换到新 SDK 时,默认设置为 userDataFolder userDataFolder reset \ (set to a new location in the host code directory) and your state is also reset.If you previously used the default userDataFolder location, when you switch to the new SDK the default userDataFolder is reset (set to a new location in the host code directory) and your state is also reset. 如果主机进程无权写入指定目录, CreateWebView2EnvironmentWithDetails 则函数可能会失败。If the host process doesn't have permission to write to the specified directory, the CreateWebView2EnvironmentWithDetails function may fail. 你可以将数据从旧目录复制到 user data folder 新目录。You may copy the data from the old user data folder to the new directory.

0.8.2300.8.230

NuGet包|Microsoft Edge 77.0.230.0 版。NuGet package | Microsoft Edge version 77.0.230.0.

  • 添加了 Stop API 以停止所有导航和挂起的资源提取 \ (#28) 。Added Stop API to stop all navigation and pending resource fetches (#28).
  • .tlb 文件包 \NuGet \ (#22 ) 添加了文件。Added .tlb file to the NuGet package (#22).
  • 向程序包 \NuGet \ (#32 ) 中的安装程序列表添加了 .NET 项目。Added .NET projects to the installer list in the NuGet package (#32).

0.8.1900.8.190

NuGet包|Microsoft Edge版本 77.0.190.0。NuGet package | Microsoft Edge version 77.0.190.0.

  • get_AreDevToolsEnabled / put_AreDevToolsEnabled 添加到控制用户能否打开 DevTools \ (#16) 。Added get_AreDevToolsEnabled/put_AreDevToolsEnabled to control if users can open DevTools (#16).
  • get_IsStatusBarEnabled / put_IsStatusBarEnabled 添加到控制状态栏是否显示 \ (#19) 。Added get_IsStatusBarEnabled/put_IsStatusBarEnabled to control if the status bar is displayed (#19).
  • get_CanGoBack / GoBack / get_CanGoForward / GoForward 添加用于返回和向前浏览导航历史记录。Added get_CanGoBack/GoBack/get_CanGoForward/GoForward for going back and forward through navigation history.
  • 添加了 HTTP 标头类型 \ () 以在 WebView 中查看 IWebView2HttpHeadersCollectionIterator / IWebView2HttpRequestHeaders / IWebView2HttpRequestHeaders 和修改 HTTP 标头。Added HTTP header types (IWebView2HttpHeadersCollectionIterator/IWebView2HttpRequestHeaders/IWebView2HttpRequestHeaders) for viewing and modifying HTTP headers in WebView.
  • 在 64 位计算机 \ (#13 ) 上添加了 32 位 WebView 支持。Added 32-bit WebView support on 64-bit machines (#13).
  • 向 SDK \ (#14 ) 添加了 WebView IDL。Added WebView IDL to the SDK (#14).
  • 添加了 lib 以支持 IID\_\* 接口 ID 对象 \ (#12) 。Added lib to support IID\_\* interface ID objects (#12).
  • 在 SDK 中添加了 DLL 文件的路径、链接和自动NuGet TARGET 文件。Added include path, linking, and autocopying of DLL files to NuGet TARGET file in SDK.
  • 在脚本中打开 window.open() 请求。Turned on requesting window.open() in script.

0.8.1490.8.149

NuGet包|Microsoft Edge 76.0.149.0 版。NuGet package | Microsoft Edge version 76.0.149.0.

初始开发人员预览版本。Initial developer preview release.