Is there any way of showing the Edge Find Panel or programmatically searching for some text via the WebView2 API?
There is currently no way to programmatically start the find panel. the find panel itself is started via CTRL+F. We'll investigate the possibilities.
Hi. Thanks. Is there any way via the WebView2 API to do a search, i.e. if I used my own Find dialog, can I then tell Edge to highlight all occurrences of some specified text?
There is currenly no DOM access, or access to any other search/find feature so we'll keep a look out for those features and expose them as soon as they become available via Edge Chromium. However, if you need anything specific in the API (https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/?view=webview2-1.0.622.22), that we haven't yet exposed, please let us know and we'll expose it. You can access all underlying APIs by implementing the AdvWebBrowser.Win unit and use the AdvWebBrowser1.NativeBrowser, convert it to a ICoreWebView2Controller interface instance.
OK, thanks for the information. We currently use a Delphi open source component, EmbeddedWB, which inherits from Delphi's TWebBrowser, and are looking at feasibility of replacing with something, e.g. TAdvWebBrowser, that uses Edge Chromium.
We have meanwhile exposed a function CallDevToolsProtocol that might give you the feature that you are looking for. according to the information it can programmatically call any function you can find supported under DevToolsProtocol:
and a link to the method itself: