Is it possible to retrieve the HTML a .NET MAUI WebView is currently displaying?
If so, how?
Unfortunately, I can't find anything on it inside the official documentation.
.NET MAUI WebView documentation
I am trying to retrieve the currently displayed HTML as a string, after a JavaScript event changed the HTML body content, to read out some meta-data.
I don't think you can access it directly (like with WebView2). However you can call Javascript, which have access to the HTML :
string result = await webView.EvaluateJavaScriptAsync($"document.documentElement.innerHTML");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With