How can I injecting javascript from webview2 in WPF


I am using gecko browser earlier. now moving to web view2. In the code when using gecko they we getting the data from the javascript and storing the data. Example given below

using (var java = new AutoJSContext(webBrowser.Window.))
var result = java.EvaluateScript("get_players()", webBrowser.Window.DomWindow);

so is there a way how web view2 works.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,710 questions
{count} votes