diff --git a/microsoft-edge/progressive-web-apps/how-to/window-controls-overlay.md b/microsoft-edge/progressive-web-apps/how-to/window-controls-overlay.md index 227b8e1ae0..43907809e4 100644 --- a/microsoft-edge/progressive-web-apps/how-to/window-controls-overlay.md +++ b/microsoft-edge/progressive-web-apps/how-to/window-controls-overlay.md @@ -97,7 +97,7 @@ The `env()` CSS function takes a second parameter that's useful for defining the When the title bar is hidden, only the system-critical window controls remain visible (the **Maximize**, **Minimize**, **Close**, and **App Info** icons). This means that there is very little space available for users to move the application window around. -You can use the `-webkit-app-region` CSS property to offer more ways for users to drag the app. For example, if your app has its own titlebar, you can turn its titlebar into a window drag handle: +You can use the `app-region` CSS property to offer more ways for users to drag the app. For example, if your app has its own titlebar, you can turn its titlebar into a window drag handle: ```css #title-bar { @@ -106,7 +106,7 @@ You can use the `-webkit-app-region` CSS property to offer more ways for users t top: env(titlebar-area-y, 0); height: env(titlebar-area-height, 50px); width: env(titlebar-area-width, 100%); - -webkit-app-region: drag; + app-region: drag; } ``` diff --git a/microsoft-edge/webview2/concepts/overview-features-apis.md b/microsoft-edge/webview2/concepts/overview-features-apis.md index 0d3a91180c..d7dbff982d 100644 --- a/microsoft-edge/webview2/concepts/overview-features-apis.md +++ b/microsoft-edge/webview2/concepts/overview-features-apis.md @@ -6,7 +6,7 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 06/03/2025 +ms.date: 08/11/2025 --- # Overview of WebView2 APIs @@ -33,6 +33,7 @@ when adding an h4 heading, add nav link below the h2 * [Cookies](#cookies) * [Image capture](#image-capture) * [Control whether the screen capture UI is shown](#control-whether-the-screen-capture-ui-is-shown) + * [Find](#find) * [Downloads](#downloads) * [Save as](#save-as) * [Configure the security warning when saving a file](#configure-the-security-warning-when-saving-a-file) @@ -731,6 +732,111 @@ The `ScreenCaptureStarting` event is raised whenever the WebView2 and/or iframe --- + +#### Find + +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're actively investigating these issues, and we encourage you to report any problems you encounter, by using the [WebView2Feedback](https://github.com/MicrosoftEdge/WebViewFeedback) repo. + +##### [.NET/C#](#tab/dotnetcsharp) + +* `CoreWebView2` Class: + * [CoreWebView2.Find Property](/dotnet/api/microsoft.web.webview2.core.corewebview2.find) + +* `CoreWebView2Environment` Class: + * [CoreWebView2Environment.CreateFindOptions Method](/dotnet/api/microsoft.web.webview2.core.corewebview2environment.createfindoptions) + +* [CoreWebView2Find Class](/dotnet/api/microsoft.web.webview2.core.corewebview2find) + * [CoreWebView2Find.ActiveMatchIndex Property](/dotnet/api/microsoft.web.webview2.core.corewebview2find.activematchindex) + * [CoreWebView2Find.ActiveMatchIndexChanged Event](/dotnet/api/microsoft.web.webview2.core.corewebview2find.activematchindexchanged) + * [CoreWebView2Find.FindNext Method](/dotnet/api/microsoft.web.webview2.core.corewebview2find.findnext) + * [CoreWebView2Find.FindPrevious Method](/dotnet/api/microsoft.web.webview2.core.corewebview2find.findprevious) + * [CoreWebView2Find.MatchCount Property](/dotnet/api/microsoft.web.webview2.core.corewebview2find.matchcount) + * [CoreWebView2Find.MatchCountChanged Event](/dotnet/api/microsoft.web.webview2.core.corewebview2find.matchcountchanged) + * [CoreWebView2Find.StartAsync Method](/dotnet/api/microsoft.web.webview2.core.corewebview2find.startasync) + * [CoreWebView2Find.Stop Method](/dotnet/api/microsoft.web.webview2.core.corewebview2find.stop) + +* [CoreWebView2FindOptions Class](/dotnet/api/microsoft.web.webview2.core.corewebview2findoptions) + * [CoreWebView2FindOptions.FindTerm Property](/dotnet/api/microsoft.web.webview2.core.corewebview2findoptions.findterm) + * [CoreWebView2FindOptions.IsCaseSensitive Property](/dotnet/api/microsoft.web.webview2.core.corewebview2findoptions.iscasesensitive) + * [CoreWebView2FindOptions.ShouldHighlightAllMatches Property](/dotnet/api/microsoft.web.webview2.core.corewebview2findoptions.shouldhighlightallmatches) + * [CoreWebView2FindOptions.ShouldMatchWord Property](/dotnet/api/microsoft.web.webview2.core.corewebview2findoptions.shouldmatchword) + * [CoreWebView2FindOptions.SuppressDefaultFindDialog Property](/dotnet/api/microsoft.web.webview2.core.corewebview2findoptions.suppressdefaultfinddialog) + +##### [WinRT/C#](#tab/winrtcsharp) + +* `CoreWebView2` Class: + * [CoreWebView2.Find Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2#find) + +* `CoreWebView2Environment` Class: + * [CoreWebView2Environment.CreateFindOptions Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environment#createfindoptions) + +* [CoreWebView2Find Class](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find) + * [CoreWebView2Find.ActiveMatchIndex Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#activematchindex) + * [CoreWebView2Find.ActiveMatchIndexChanged Event](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#activematchindexchanged) + * [CoreWebView2Find.FindNext Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#findnext) + * [CoreWebView2Find.FindPrevious Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#findprevious) + * [CoreWebView2Find.MatchCount Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#matchcount) + * [CoreWebView2Find.MatchCountChanged Event](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#matchcountchanged) + * [CoreWebView2Find.StartAsync Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#startasync) + * [CoreWebView2Find.Stop Method](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find#stop) + +* [CoreWebView2FindOptions Class](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2findoptions) + * [CoreWebView2FindOptions.FindTerm Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2findoptions#findterm) + * [CoreWebView2FindOptions.IsCaseSensitive Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2findoptions#iscasesensitive) + * [CoreWebView2FindOptions.ShouldHighlightAllMatches Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2findoptions#shouldhighlightallmatches) + * [CoreWebView2FindOptions.ShouldMatchWord Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2findoptions#shouldmatchword) + * [CoreWebView2FindOptions.SuppressDefaultFindDialog Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2findoptions#suppressdefaultfinddialog) + +##### [Win32/C++](#tab/win32cpp) + +* [ICoreWebView2_28](/microsoft-edge/webview2/reference/win32/icorewebview2_28) + * [ICoreWebView2_28::get_Find](/microsoft-edge/webview2/reference/win32/icorewebview2_28#get_find) + +* [ICoreWebView2Environment15](/microsoft-edge/webview2/reference/win32/icorewebview2environment15) + * [ICoreWebView2Environment15::CreateFindOptions](/microsoft-edge/webview2/reference/win32/icorewebview2environment15#createfindoptions) + +* [ICoreWebView2Find](/microsoft-edge/webview2/reference/win32/icorewebview2find) + * [ICoreWebView2Find::add_ActiveMatchIndexChanged](/microsoft-edge/webview2/reference/win32/icorewebview2find#add_activematchindexchanged) + * [ICoreWebView2Find::add_MatchCountChanged](/microsoft-edge/webview2/reference/win32/icorewebview2find#add_matchcountchanged) + * [ICoreWebView2Find::FindNext](/microsoft-edge/webview2/reference/win32/icorewebview2find#findnext) + * [ICoreWebView2Find::FindPrevious](/microsoft-edge/webview2/reference/win32/icorewebview2find#findprevious) + * [ICoreWebView2Find::get_ActiveMatchIndex](/microsoft-edge/webview2/reference/win32/icorewebview2find#get_activematchindex) + * [ICoreWebView2Find::get_MatchCount](/microsoft-edge/webview2/reference/win32/icorewebview2find#get_matchcount) + * [ICoreWebView2Find::remove_ActiveMatchIndexChanged](/microsoft-edge/webview2/reference/win32/icorewebview2find#remove_activematchindexchanged) + * [ICoreWebView2Find::remove_MatchCountChanged](/microsoft-edge/webview2/reference/win32/icorewebview2find#remove_matchcountchanged) + * [ICoreWebView2Find::Start](/microsoft-edge/webview2/reference/win32/icorewebview2find#start) + * [ICoreWebView2Find::Stop](/microsoft-edge/webview2/reference/win32/icorewebview2find#stop) + +* [ICoreWebView2FindActiveMatchIndexChangedEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2findactivematchindexchangedeventhandler) + +* [ICoreWebView2FindMatchCountChangedEventHandler](/microsoft-edge/webview2/reference/win32/icorewebview2findmatchcountchangedeventhandler) + +* [ICoreWebView2FindOptions](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions) + * [ICoreWebView2FindOptions::get_FindTerm](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#get_findterm) + * [ICoreWebView2FindOptions::get_IsCaseSensitive](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#get_iscasesensitive) + * [ICoreWebView2FindOptions::get_ShouldHighlightAllMatches](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#get_shouldhighlightallmatches) + * [ICoreWebView2FindOptions::get_ShouldMatchWord](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#get_shouldmatchword) + * [ICoreWebView2FindOptions::get_SuppressDefaultFindDialog](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#get_suppressdefaultfinddialog) + * [ICoreWebView2FindOptions::put_FindTerm](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#put_findterm) + * [ICoreWebView2FindOptions::put_IsCaseSensitive](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#put_iscasesensitive) + * [ICoreWebView2FindOptions::put_ShouldHighlightAllMatches](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#put_shouldhighlightallmatches) + * [ICoreWebView2FindOptions::put_ShouldMatchWord](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#put_shouldmatchword) + * [ICoreWebView2FindOptions::put_SuppressDefaultFindDialog](/microsoft-edge/webview2/reference/win32/icorewebview2findoptions#put_suppressdefaultfinddialog) + +* [ICoreWebView2FindStartCompletedHandler](/microsoft-edge/webview2/reference/win32/icorewebview2findstartcompletedhandler) + +--- + + #### Downloads @@ -1256,7 +1362,6 @@ To experiment with Fluent overlay scrollbars, in Microsoft Edge, go to `edge://f See also: * [WebView2 browser flags](./webview-features-flags.md) - `msEdgeFluentOverlayScrollbar` and `msOverlayScrollbarWinStyle` flags. - ##### [.NET/C#](#tab/dotnetcsharp)