WebView.InvokeScript(String, String[]) WebView.InvokeScript(String, String[]) WebView.InvokeScript(String, String[]) WebView.InvokeScript(String, String[]) Method

Definition

Note

@Windows.UI.Xaml.Controls.WebView.InvokeScript(System.String,System.String[])?text=InvokeScript may be altered or unavailable for releases after Windows 8.1. Instead, use InvokeScriptAsync.

Executes the specified script function from the currently loaded HTML, with specific arguments.

public : Platform::String InvokeScript(Platform::String scriptName, Platform::String[] arguments)
winrt::hstring InvokeScript(winrt::hstring scriptName, winrt::hstring[] arguments) const;
public string InvokeScript(String scriptName, String[] arguments)
Public Function InvokeScript(scriptName As String, arguments As String[]) As string

Parameters

scriptName
String String

The name of the script function to invoke.

arguments
String[] String[]

A string array that packages arguments to the script function.

Returns

string string

The result of the script invocation.

Remarks

The invoked script can return only string values.

See also