WebView2.ExecuteScriptAsync(String) Method

Definition

Asynchronously executes the provided script in the top level document of the WebView2.

C#
public IAsyncOperation<string> ExecuteScriptAsync(string javascriptCode);

Parameters

javascriptCode
String

The script to execute.

Returns

IAsyncOperation<String>

A Task that represents the script execution process.

Applies to

Product Versions
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6