WebView2.ExecuteScriptAsync(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.