Release notes for WebView2 SDK
The WebView2 team updates the WebView2 SDK on a six-week cadence. Review the following content for up-to-date information on product announcements, additions, modifications, and breaking changes to the APIs.
Note
Re-compile your app after updating the NuGet package.
1.0.721-prerelease
Release Date: December 8, 2020
NuGet package | minimum Microsoft Edge version 86.0.616.0.
General
Important
Breaking Change: WebView2 pre-release packages 1.0.707 and 0.9.628 have been deprecated. Please discontinue development with these packages.
Features
Added WebView2 Group Policies. For more information on recommended practices, navigate to group policies for WebView2.
-
Important
Breaking Change: Deprecated the old registry location.
{Root}\Software\Policies\Microsoft\EmbeddedBrowserWebView\LoaderOverride\{AppId}
Added support for Drag & Drop within WebView2.
Added APIs to handle DPI support.
- Added RasterizationScale property to change the DPI scale for WebView content and UI popups, and associated RasterizationScaleChanged event.
- Added ShouldDetectMonitorScaleChanges property to automatically update
RasterizationScale
property if needed. - Added BoundsMode property to specify that the bounds are logic pixels and allow WebView to use the
RasterizationScale
for WebView2 pixel display, and have WebView apply theRasterizationScale
to theBounds
to get the physical size.
Updated
NewWindowRequested
event to handleCtrl
+click
andShift
+click
. (#168 and #371).Promoted the following experimental changes to stable:
.NET
Features
- Enabled WinForms designer in .NET Core 3.1+ and .NET 5.
- Improved .NET cookie management. (#611).
- Replaced
CoreWebView2Ready
with CoreWebView2InitializationCompleted.
Bug fixes
- Added AcceleratorKeyPressed event to support AcceleratorKey press in WebView2. (#288).
- Removed unnecessary files from being output to WebView2 folders. (#461).
- Improved host object API. (#335 and #525).
1.0.664.37
Release Date: November 20, 2020
NuGet package | minimum WebView2 Runtime version 86.0.616.0.
General
Important
Announcement: .NET WPF/WinForms WebView2 is now Generally Available (GA). Starting with this release, Release SDKs are forward-compatible. For more details, navigate to GA announcement blog post.
Features
- .NET WPF/WinForms WebView2 is now Generally Available (GA).
- Fixed Distribution (Bring-your-own) mode has reached GA.
.NET
Bug fixes
CoreWebView2NewWindowRequestedEventArgs.Handled
prevents new window from being opened (#549) and (#560).
1.0.674-prerelease
Release Date: October 19, 2020
NuGet package | minimum WebView2 Runtime version 86.0.616.0.
General
- Added NavigateWithWebResourceRequest method that lets you provide post data or additional request headers during navigation.
- Added DOMContentLoaded event that runs when the initial HTML document is loaded and parsed.
- Added the Environment property on WebView2. This property exposes the WebView2 environment where an instance of WebView2 was created.
- Added cookie management APIs that allow developers to authenticate the WebView2 session, or retrieve cookies from WebView to authenticate other tools. We're planning to make language/framework specific improvements. For more information, navigate to API Review: Cookie Management.
- Updated the WebResourceResponseReceived event, and added immutable WebResourceResponseView and WebResourceResponseReceivedEventArgs::PopulateResponseContent to become WebResourceResponseView::GetContent.
- Turned off Microsoft Defender Application Guard (WDAG) in WebView2.
- Added SystemCursorId for Visual Hosting.
- Added bug fixed for Input Method in Visual Hosting.
- Developers no longer have to include version.lib when using WebView2 static library.
.NET
- Updated CoreWebView2 class to expose the CoreWebView2Environment variable.
- Changed implementations of custom EventArgs classes in
Microsoft.Web.WebView2.Core
namespace to be subclasses of System.EventArgs or System.ComponentModel.CancelEventArgs. (#250) - Added support for CoreWebView2CreationProperties in WinForms. (#204)
- Added .NET WebResourceRequested APIs. (#219).
- Updated WinForms Designer Source property to default or reset to null. (#177).
- Updated WebView2 bounds in WebView2.Init() to support DPI modes that are less than 100%. (#432).
- Updated BuildWindowCore and DestroyWindowCore to be more robust. (#382).
- Updated .NET Loader base to load on process bit instead of operating system architecture. (#431).
- Renamed
EdgeNotFoundExpection
to WebView2RuntimeNotFoundException.
1.0.622.22
Release Date: October 19, 2020
NuGet package | minimum WebView2 Runtime version 86.0.616.0.
General
Important
Announcement: Win32 C/C++ WebView2 is now Generally Available (GA). Starting with this release, Release SDKs are forward-compatible. For more information, navigate to GA announcement blog post.
- Evergreen WebView2 Runtime and installer are GA. Bootstrapper, downlink link for the Bootstrapper, and Standalone Installer for the Evergreen Runtime are available on Microsoft Edge WebView2. Sample code for the installation workflow is also available in the WebView2Samples repo.
- Fixed Version mode is available for developer preview.
0.9.622.11
Release Date: September 10, 2020
NuGet package | minimum WebView2 Runtime version 86.0.616.0.
General
-
Important
Announcement: This SDK is the Release Candidate for WebView2 Win32 C/C++ GA. The GA version should use same API interface and functionality.
Disconnected browser policies.
Added AllowSingleSignOnUsingOSPrimaryAccount property on WebView2 environment options to enable conditional access for WebView.
Updated
ICoreWebView2NewWindowRequestedEventArgs
to include WindowFeatures property, and the associated ICoreWebView2WindowFeatures. (#293).Updated
System.Windows.Rect
to useSystem.Drawing.Rectangle
instead ofSystem.Windows.Rect
(#235).Updated NewWindowRequested event to handle
window.open()
request without parameters. (#293).AdditionalBrowserArguments set using
ICoreWebView2EnvironmentOptions
aren't overridden with environment variables or registry values. For more information, navigate to CreateCoreWebView2EnvironmentWithOptions.
0.9.579
Release Date: July 20, 2020
NuGet package | minimum Microsoft Edge version 86.0.579.0.
General
-
Important
Announcement: Evergreen WebView2 Runtime and installer is released for preview. For more information, navigate to [Distribution of WebView2][Webview2ConceptsDistributionUnderstandRuntimeInstallerPreview].
Added WebView worker thread improvements. (#318).
Disabled popup blocker in WebView. For more information, navigate to the IsUserInitiated property in the
NewWindowRequested
event.Ensured WebView navigation starting event is fired for
about:blank
. Now,NavigationStarting
events are fired for all navigation, but cancellations forabout:blank
or iframe srcdoc aren't supported and ignored.Blocked
edge:// URI
scheme in WebView.Added experimental IsSingleSignOnUsingOSPrimaryAccountEnabled property on WebView2 environment options to enable conditional access for WebView.
Added experimental WebResourceResponseReceived event that fires after the WebView has received and processed the response for a WebResource request. Authentication headers, if any, are included in the response object.
.NET
- Improved WPF focus handling. (#185).
- Added
ZoomFactor
property on WPF Webview2 Controller.
0.9.538
NuGet package | minimum Microsoft Edge version 85.0.538.0.
General
- Dropping support for WebView2 SDK Version 0.8.149. WebView2 recommends staying up to date with the latest version of WebView2.
- Updated group policy to account for when the profile path of the Microsoft Edge browser is modified (#179).
Win32 C/C++
- Added ICoreWebView2ExperimentalNewWindowRequestedEventArgs::get_WindowFeatures, which fires when
window.open()
is run and associated with ICoreWebView2ExperimentalWindowFeatures (#70). -
Important
Breaking Change: Deprecated CreateCoreWebView2EnvironmentWithDetails and replaced with [CreateCoreWebView2EnvironmentWithOptions][ReferenceWin32IdlCreatecorewebview2environmentwithoptions09538.
-
Important
Breaking Change: In order to ensure the WebView2 API aligns with the Windows API naming conventions, the WebView team updated the names of the following.
- Updated AddHostObjectToScript to ensure original host object serializer markers are set to the proxy objects, and serialized back as a host object when passed as a parameter in the JavaScript callback (#148).
.NET (0.9.538 pre-release)
- Released WinForms and WPF WebView2API Samples, which are comprehensive guides of the WebView2 SDK. For more information, navigate to Samples Repo.
- Added support for visual hosting and window features experimental APIs.
-
Important
Breaking Change: The following deferrals now implement IDisposable: ScriptDialogOpening, NewWindowRequested, WebResourceRequested, and PermissionRequested.
- Added GetAvailableBrowserVersionString and CompareBrowserVersions as CoreWebView2Environment statics.
0.9.515-prerelease
NuGet package | minimum Microsoft Edge version 84.0.515.0.
-
Important
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.
- For more information about building WPF applications, navigate to the WPF Getting Started Guide and the WebView2 WPF Reference for WPF-specific APIs.
- For more information about building Windows Forms applications, navigate to the Windows Forms Getting Started Guide and the WebView2 Windows Forms Reference for Windows Forms specific APIs.
- For more information about the CoreWebView2 APIs, navigate to .NET Reference.
-
Caution
Known Issues: The WebView team is aware of some issues in the pre-release that are being resolved in future releases.
- DPI Awareness: WebView2 for WPF is currently not DPI aware. 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 Designer: The WPF designer is not currently supported. Add the WebView2 control in your app by directly modifying the appropriate XAML in a text editor.
0.9.488
NuGet package | minimum Microsoft Edge version 84.0.488.0.
-
Important
Announcement: Starting with the upcoming Microsoft Edge version 83, evergreen WebView no longer targets the Stable browser channel. Instead, it targets another set of binaries, branded Evergreen WebView2 Runtime, that you may chain-install through an installer the WebView team is currently developing. For more information, navigate to App-Distribution.
-
Important
Announcement: Moving forward, the WebView team releases two packages: a pre-release package with experimental APIs (for you to try out) and a stable release package with stable APIs (for your confidence). To learn about the differences, navigate to Understanding browser versions and WebView2.
-
Important
Breaking Change: In order to ensure the WebView2 API aligns with the Windows API naming conventions, the WebView team updated the names of the following interfaces.
CORE_WEBVIEW2_*
prefix is nowCOREWEBVIEW2_*
.- GetCoreWebView2BrowserVersionInfo is now GetAvailableCoreWebView2BrowserVersionString.
- get_BrowserVersionInfo is now get_BrowserVersionString.
- AddRemoteObject is now AddHostObjectToScript.
- RemoveRemoteObject is now RemoveHostObjectFromScript.
chrome.webview.remoteObjects
is nowchrome.webview.hostObjects
.
-
Important
Breaking Change: The
AddRemoteObject
JS proxy methods are also renamed.getLocal
is nowgetLocalProperty
.setLocal
is nowsetLocalProperty
.getRemote
is nowgetHostProperty
.setRemote
is nowsetHostProperty
.applyRemote
is nowapplyHostFunction
.
-
Important
Breaking Change: Deprecated CreateCoreWebView2EnvironmentWithDetails and replaced with CreateCoreWebView2EnvironmentWithOptions.
- Added FrameNavigationCompleted event. Now, when an iframe completes navigation, an event is fired and returns the success of the navigation and the navigation ID.
- Added ICoreWebView2EnvironmentOptions interface, which may be used to determine the version of the WebView2 Runtime the application targets.
- Added IsBuiltInErrorPageEnabled setting. Now, you may choose to enable or disable the built-in error page for navigation failure and render process failure.
- Updated Remote Object Injection to support .NET
IDispatch
implementations (#113). - Updated NewWindowRequested event to handle requests from context menus (#108).
- Released the first separate WebView2 pre-release package where you may access visual hosting APIs. The WebView team updated APISample to include the new experimental APIs.
- Added ICoreWebView2ExperimentalCompositionController interface, to connect to a composition tree and provide input for the WebView.
- Added ICoreWebView2ExperimentalPointerInfo, which contains all the information from a
POINTER_INFO
. This object is passed to SendPointerInput to inject pointer input into the WebView. - Added ICoreWebView2ExperimentalCursorChangedEventHandler, which tells the app when the mouse cursor over the WebView should be changed. When mouse is over a text box in the WebView, the cursor changes from the arrow to the selector. The
cursor
property on theCompositionController
tells the app what the mouse cursor should currently be for the WebView.
0.9.430
NuGet package | minimum Microsoft Edge version 82.0.430.0.
The WebView2 SDK is the official Win32 C++ Beta version, which incorporates several feature requests from feedback. The WebView team tries to limit the number of releases with breaking changes. As we approach general availability, several major breaking changes will be incorporated in the Beta release.
-
Important
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. Additionally, 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 supports all other WebView2 functionality. To learn more about incorporating the changes, navigate to the WebView2 pull request in the WebView2 APISample project. -
Important
Breaking Change: Split DocumentStateChanged into three components: SourceChanged, ContentLoading, and HistoryChanged. Now, when the source URL changes the
SourceChanged
event is fired. When the history state is changed theHistoryChanged
event is fired. TheContentLoading
event is fired before the initial script when a new document is being loaded. - Added support for ARM64 architecture.
- Added Soft Input Panel (SIP) support for touch screen devices.
- Added support for Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, and Windows Server 2016.
- Added NotifyParentWindowPositionChanged, which allows for the status bar to follow the window in windowed mode. Also, implement this change in windowless mode in order for accessibility features to work.
- Added AreRemoteObjectsAllowed setting to globally control whether a page may be accessed by any remote objects. By default,
AreRemoteObjectsAllowed
is enabled, meaning remote objects added by AddRemoteObject are accessible from the page. WhenAreRemoteObjectsAllowed
is disabled, the objects aren't accessible from the page. Changes are applied on the next navigation event. - Added IsZoomControlEnabled setting to prevent users from impacting the zoom of the WebView using
ctrl
++
andctrl
+-
(orctrl
+ mouse wheel). Zoom may still be set using put_ZoomFactor when the setting is disabled. - Changed ZoomFactor to only apply to the current WebView. Zoom changes to the current WebView don't impact other WebViews that you've navigated to the same site of origin. For more information, navigate to get_ZoomFactor.
- Hid ZoomView UI for WebView (#95).
- Added SetBoundsAndZoomFactor. Now, you may set the zoom factor and bounds of a WebView at the same time.
- Added WindowCloseRequested event. For more information, navigate to add_WindowCloseRequested (#119).
- Added support for the
beforeunload
dialog type for JavaScript dialog events and added CORE_WEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD enum entry. - Added GetHeaders to HttpRequestHeaders, GetHeader to HttpResponseHeaders, and get_HasCurrentHeader property to HttpHeadersCollectionIterator.
-
Important
Breaking Change: Modified
DevToolsProtocolEventReceived
behavior. Now, you may create a DevToolsProtocolEventReceiver for a particular DevTools Protocol event and subscribe/unsubscribe to such event using add_DevToolsProtocolEventReceived/remove_DevToolsProtocolEventReceived. -
Important
Breaking Change: Changed
WebMessageReceivedEventArgs
get_WebMessageAsString property to a TryGetWebMessageAsString method. -
Important
Breaking Change: Changed
AcceleratorKeyPressedEventArgs
Handle method to a get_Handled property.
0.8.355
NuGet package | minimum Microsoft Edge version 80.0.355.0.
- Released WebView2API Sample, a comprehensive guide of the WebView2 SDK. For more information, navigate to APISample.
- Added IME support for all languages besides English (#30).
- 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. To create a web resource requested event, use add_WebResourceRequested to add the event and AddWebResourceRequestedFilter to add a filter. RemoveWebResourceRequestedFilter removes the filter (#36) (#74). -
Important
Breaking Change: Modified fullscreen behavior. Deprecated IsFullScreenAllowed. Now, by default, if an element within a WebView (such as a video) is set to full screen, it fills the bounds of the 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.314
NuGet package | minimum Microsoft Edge version 80.0.314.0.
Added support for Windows 7, Windows 8, and Windows 8.1.
Added Visual Studio and Visual Studio Code debug support for WebView2. Now, debug your script in the WebView2 right from your IDE. For more information, navigate to How to debug when developing with WebView2 controls.
Added
Native Object Injection
, which allows the script running within WebView2 to access an IDispatch object from the Win32 component of the application and access the properties of the IDispatch object. For more information, navigate to AddRemoteObject (#17).Added
AcceleratorKeyPressed
event. For more information, navigate to add_AcceleratorKeyPressed (#57).Disabled
Context Menus
. For more information, navigate to put_AreDefaultContextMenusEnabled (#57).Updated
DPI Awareness
. Now, the DPI awareness of WebView is the same as the DPI awareness of the host application.Note
If another hybrid application is launched with a different DPI Awareness than the original WebView, the new WebView is not launched if the user data directory is the same (#1).
Updated
Notification Change Behavior
so WebView2 automatically rejects notification permission requests prompted by web content hosted within the WebView.
0.8.270
NuGet package | minimum Microsoft Edge version 78.0.270.0.
- Added
DocumentTitleChanged
event to indicate document title change (#27). - Added
GetWebView2BrowserVersionInfo
API (#18). - Added
NewWindowRequested
event. - Updated
CreateWebView2EnvironmentWithDetails
function to removereleaseChannelPreference
. For more information about theCreateWebView2EnvironmentWithDetails
function, navigate to CreateWebView2EnvironmentWithDetails. The registry and environment variable override is still supported. The default channel preference is used unless overridden.
During the channel search, the WebView team skips any previous channel version that isn't compatible with the WebView2 SDK.
The WebView team selects the more stable channel to ensure the most consistent behaviors for the end user. When you test with latest Canary builds, you should create a script to set theWEBVIEW2_RELEASE_CHANNEL_PREFERENCE
environment variable to1
before launching the app. - Updated the
CreateWebView2EnvironmentWithDetails
function with logic for selectinguserDataFolder
when not specified. For more information about theCreateWebView2EnvironmentWithDetails
function, navigate to CreateWebView2EnvironmentWithDetails. If you previously used the defaultuserDataFolder
location, when you switch to the new SDK the defaultuserDataFolder
is reset (set to a new location in the host code directory) and your state is also reset.
If the host process doesn't have permission to write to the specified directory, theCreateWebView2EnvironmentWithDetails
function may fail. You may copy the data from the old user data directory to the new directory.
0.8.230
NuGet package | minimum Microsoft Edge version 77.0.230.0.
- Added
Stop
API to stop all navigation and pending resource fetches (#28). - Added
.tlb
file to the NuGet package (#22). - Added .NET projects to the installer list in the NuGet package (#32).
0.8.190
NuGet package | minimum Microsoft Edge version 77.0.190.0.
- Added
get_AreDevToolsEnabled
/put_AreDevToolsEnabled
to control if users can open DevTools (#16). - Added
get_IsStatusBarEnabled
/put_IsStatusBarEnabled
to control if the status bar is displayed (#19). - Added
get_CanGoBack
/GoBack
/get_CanGoForward
/GoForward
for going back and forward through navigation history. - Added HTTP header types (
IWebView2HttpHeadersCollectionIterator
/IWebView2HttpRequestHeaders
/IWebView2HttpRequestHeaders
) for viewing and modifying HTTP headers in WebView. - Added 32-bit WebView support on 64-bit machines (#13).
- Added WebView IDL to the SDK (#14).
- Added lib to support
IID\_\*
interface ID objects (#12). - Added include path, linking, and autocopying of DLL files to NuGet
TARGET
file in SDK. - Enabled requesting
window.open()
in script.
0.8.149
NuGet package | minimum Microsoft Edge version 76.0.149.0.
Initial developer preview release.