WebView.InvokeScript Method

Definition

Overloads

InvokeScript(String, IEnumerable<String>)

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

InvokeScript(String, String[])

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

InvokeScript(String)

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

InvokeScript(String, IEnumerable<String>)

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

public string InvokeScript (string scriptName, System.Collections.Generic.IEnumerable<string> arguments);
abstract member InvokeScript : string * seq<string> -> string
override this.InvokeScript : string * seq<string> -> string
Public Function InvokeScript (scriptName As String, arguments As IEnumerable(Of String)) As 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.

Applies to

InvokeScript(String, String[])

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

public string InvokeScript (string scriptName, params string[] arguments);
abstract member InvokeScript : string * string[] -> string
override this.InvokeScript : string * string[] -> string
Public Function InvokeScript (scriptName As String, ParamArray arguments As String()) As 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.

Applies to

InvokeScript(String)

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

public string InvokeScript (string scriptName);
abstract member InvokeScript : string -> string
override this.InvokeScript : string -> string
Public Function InvokeScript (scriptName As String) As 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.

Applies to