Hi

Once WebView2 is ready, inject the script to capture input field changes

 webView.CoreWebView2.NavigationCompleted += (sender, args) =>

{

    webView.CoreWebView2.ExecuteScriptAsync(@"

        document.getElementById('idt').addEventListener('input', function() {

            window.chrome.webview.postMessage(this.value);

        });

    ");

};


Previous
Next Post »