WebView.InvokeScriptAsync Method

Definition

Overloads

InvokeScriptAsync(String, IEnumerable<String>)

Executes the specified script function from the currently loaded HTML, with no arguments, as an asynchronous action.

InvokeScriptAsync(String, String[])

Executes the specified script function from the currently loaded HTML, with no arguments, as an asynchronous action.

InvokeScriptAsync(String)

Executes the specified script function from the currently loaded HTML, with no arguments, as an asynchronous action.

InvokeScriptAsync(String, IEnumerable<String>)

Executes the specified script function from the currently loaded HTML, with no arguments, as an asynchronous action.

public System.Threading.Tasks.Task<string> InvokeScriptAsync (string scriptName, System.Collections.Generic.IEnumerable<string> arguments);
abstract member InvokeScriptAsync : string * seq<string> -> System.Threading.Tasks.Task<string>
override this.InvokeScriptAsync : string * seq<string> -> System.Threading.Tasks.Task<string>
Public Function InvokeScriptAsync (scriptName As String, arguments As IEnumerable(Of String)) As Task(Of String)

Parameters

scriptName
String

Name of the script function to invoke.

arguments
IEnumerable<String>

A string array that packages arguments to the script function.

Returns

When this method returns, the String result of the script invocation.

Implements

Remarks

To prevent malicious code from exploiting your app, be sure to call this method to invoke only scripts that you trust. The invoked script can only return string values.

Applies to

InvokeScriptAsync(String, String[])

Executes the specified script function from the currently loaded HTML, with no arguments, as an asynchronous action.

public System.Threading.Tasks.Task<string> InvokeScriptAsync (string scriptName, params string[] arguments);
abstract member InvokeScriptAsync : string * string[] -> System.Threading.Tasks.Task<string>
override this.InvokeScriptAsync : string * string[] -> System.Threading.Tasks.Task<string>
Public Function InvokeScriptAsync (scriptName As String, ParamArray arguments As String()) As Task(Of String)

Parameters

scriptName
String

Name of the script function to invoke.

arguments
String[]

A string array that packages arguments to the script function.

Returns

When this method returns, the String result of the script invocation.

Implements

Remarks

To prevent malicious code from exploiting your app, be sure to call this method to invoke only scripts that you trust. The invoked script can only return string values.

Applies to

InvokeScriptAsync(String)

Executes the specified script function from the currently loaded HTML, with no arguments, as an asynchronous action.

public System.Threading.Tasks.Task<string> InvokeScriptAsync (string scriptName);
abstract member InvokeScriptAsync : string -> System.Threading.Tasks.Task<string>
override this.InvokeScriptAsync : string -> System.Threading.Tasks.Task<string>
Public Function InvokeScriptAsync (scriptName As String) As Task(Of String)

Parameters

scriptName
String

Name of the script function to invoke.

Returns

When this method returns, the String result of the script invocation.

Implements

Remarks

To prevent malicious code from exploiting your app, be sure to call this method to invoke only scripts that you trust. The invoked script can only return string values.

Applies to