Hi

CoreWebView2_WebMessageReceived is not fired

 private async void InitializeWebView()

{

    await webView.EnsureCoreWebView2Async(null);  // Ensure WebView2 is initialized

    webView.CoreWebView2.WebMessageReceived += CoreWebView2_WebMessageReceived;

    

    // Enable WebView2 to receive messages from JavaScript

    webView.CoreWebView2.Settings.IsWebMessageEnabled = true;


    // Load the webpage containing the input field

    webView.Source = new Uri("https://yourwebsite.com");  // Change URL accordingly

}


Previous
Next Post »