Skip to content

NavigationWebView.ExecuteScriptAsync(string) method

Defined in

Type: NavigationWebView Namespace: CrissCross.WPF Assembly: CrissCross.WPF.dll

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

public Task<string> ExecuteScriptAsync(string javaScript)

Summary: Executes JavaScript code from the javaScript parameter in the current top level document rendered in the WebView. Equivalent to calling Microsoft.Web.WebView2.Core.CoreWebView2.ExecuteScriptAsync(System.String) on Microsoft.Web.WebView2.Wpf.WebView2.CoreWebView2.

Parameters

NameTypeDescription
javaScriptstringThe java script.

Returns: Task -- A string.