Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Release notes for Microsoft Edge WebView2 Prerelease SDK, release date: Jan. 24, 2025.
NuGet package for WebView2 SDK 1.0.3079-prerelease
For full API compatibility, this Prerelease version of the WebView2 SDK requires the WebView2 Runtime that ships with Microsoft Edge version 134.0.3079.0 or later; see Runtime 134.0.3124.44 (Mar. 10, 2025).
Detailed contents:
- Experimental APIs (Phase 1: Experimental in Prerelease)
- Promotions to Phase 2 (Stable in Prerelease)
- Bug fixes
- See also
Experimental APIs (Phase 1: Experimental in Prerelease)
The following Experimental APIs have been added in this Prerelease SDK.
Customize the Find behavior (Find API)
The Find API allows you to programmatically control Find operations, and enables adding the following functionality to your app:
- Customize Find options, including Find Term, Case Sensitivity, Word Matching, Match Highlighting, and Default UI Suppression.
- Find text strings and navigate among them within a WebView2 control.
- Programmatically initiate Find operations, and navigate Find results.
- Suppress the default Find UI.
- Track the status of Find operations.
There are known issues with the Find API for PDF documents. When you view a PDF document within a WebView2 control, the Find feature currently only provides the first index and the number of matches found. For example, if the string occurs three times in a PDF, the UI would say 1/3 and would not support programmatically calling Next or Previous. We are actively investigating these issues, and we encourage you to report any problems you encounter, by using the WebView2Feedback repo.
CoreWebView2Class:CoreWebView2EnvironmentClass:-
- CoreWebView2Find.ActiveMatchIndex Property
- CoreWebView2Find.ActiveMatchIndexChanged Event
- CoreWebView2Find.FindNext Method
- CoreWebView2Find.FindPrevious Method
- CoreWebView2Find.MatchCount Property
- CoreWebView2Find.MatchCountChanged Event
- CoreWebView2Find.StartAsync Method
- CoreWebView2Find.Stop Method
Customize the drag and drop behavior (DragStarting API)
The DragStarting API overrides the default drag and drop behavior when running in visual hosting mode. The DragStarting event notifies your app when the user starts a drag operation in the WebView2, and provides the state that's necessary to override the default WebView2 drag operation with your own logic.
- Use
DragStartingon theICoreWebView2ExperimentalCompositionController6to add an event handler that's invoked when the drag operation is starting. - Use
ICoreWebView2ExperimentalDragStartingEventArgsto start your own drag operation.- Use the
GetDeferralmethod to execute any async drag logic and call back into the WebView at a later time. - Use the
Handledproperty to let the WebView2 know whether to use its own drag logic.
- Use the
Track navigation history for nested iframes (FrameCreatedEvent API)
The FrameCreatedEvent API supports nested iframes, such as recording the navigation history for a second-level iframe. Without this API, WebView2 only tracks first-level iframes, which are the direct child iframes of the main frame. Using this API, your app can subscribe to the nested iframe creation event, giving the app access to all properties, methods, and events of CoreWebView2Frame for the nested iframe.
Use this API to manage iframe tracking on a page that contains multiple levels of iframes. You can choose to track any of the following:
- Only the main page and first-level iframes (the default behavior).
- A partial WebView2 frames tree with specific iframes of interest.
- The full WebView2 frames tree.
CoreWebView2FrameClass:
Set default background color on WebView2 initialization (DefaultBackgroundColor API)
The DefaultBackgroundColor API allows users to set the DefaultBackgroundColor property at initialization. This prevents a disruptive white flash during the WebView2 loading process.
CoreWebView2ControllerOptionsClass:
Promotions to Phase 2 (Stable in Prerelease)
The following APIs have been promoted from Phase 1: Experimental in Prerelease, to Phase 2: Stable in Prerelease, and are included in this Prerelease SDK.
Show WPF elements on top of the WebView2 layer (WebView2CompositionControl)
The WebView2CompositionControl prevents the WebView2 control from being the topmost layer in a WPF app and obscuring any WPF elements. Microsoft.Web.WebView2.Wpf.WebView2CompositionControl is a drop-in replacement for the standard WPF WebView2 control. Both the WebView2 control and WebView2CompositionControl implement the Microsoft.Web.WebView2.Wpf.IWebView2 interface. Both of them derive from FrameworkElement, as follows:
FrameworkElement->HwndHost->WebView2.FrameworkElement->Control->WebView2CompositionControl.
Background: If you're building a Windows Presentation Foundation (WPF) app and using the WebView2 control, you may find that your app runs into "airspace" issues, where the WebView2 control is always displayed on top, hiding any WPF elements in the same location, even if you try to specify the WPF elements to be above the WebView2 control (using visual tree order or the z-index property, for example).
This issue occurs because the WPF control uses the WPF HwndHost to host the Win32 WebView2 control, and HwndHost has an issue with airspace.
The previous phase isn't in the release notes.
See also:
Bug fixes
- Fixed an issue in the WPF
WebView2CompositionControlwhere it's not displayed if it's initialized with size (0,0), such as when it's initialized in aTabItemof aTabControl. (Issue #4941)