Hi Vernon,
Thank you for posting this issue in Microsoft Q&A forum.
As you know, the await operator can only be used within an async method, so if you want to use it in private void webView_NavigationCompleted(XXXXX) event, you probably need to add async in the codes, like this private async void webView_NavigationCompleted(XXXXX).
In addition, I did some tests on my side and please kindly check(refer to) following codes(snippet):
private async void webView_NavigationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2NavigationCompletedEventArgs e)
{
string html = await webView.CoreWebView2.ExecuteScriptAsync("document.documentElement.outerHTML");
var htmldecoded = System.Web.Helpers.Json.Decode(html);
richTextBox1.Text = htmldecoded;
}
The result:

- Update1:
System.Web.Helpers.XXXX is included in this reference: System.Web.Helpers, please also remember to add System.Web.Helpers reference by right-clicking References > Add Reference… > Assemblies > type system.web.help in the “Search box” and select the System.Web.Helpers reference > OK.

Sincerely,
Tianyu
- If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.