Compartilhar via


WebView2.ExecuteScriptAsync(String) Method

Definition

Executes the provided script in the top level document of the WebView2. This is equivalent to ExecuteScriptAsync(String).

public System.Threading.Tasks.Task<string> ExecuteScriptAsync (string script);
member this.ExecuteScriptAsync : string -> System.Threading.Tasks.Task<string>
Public Function ExecuteScriptAsync (script As String) As Task(Of String)

Parameters

script
String

Returns

Exceptions

Thrown when browser process has unexpectedly and left this control in an invalid state. We are considering throwing a different type of exception for this case in the future.

Applies to

See also