Try use the code provided in this answer instead.
InvokeScript("eval",args) on webview2
Sign in to comment
Sort by: Most helpful
The old one which is named WebView has
InvokeScriptmethod, but there is no method in WebView2 Class Method like
By the way, you can create your custom InvokeScript method referring to cheong00's reply.
If the response 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.