WebView.InvokeScript method

[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.

Syntax


public string InvokeScript(
  string scriptName, 
  string[] arguments
)

Parameters

scriptName

Type: System.String [.NET] | Platform::String [C++]

The name of the script function to invoke.

arguments

Type: System.String[] [.NET] | Platform::Array<Platform::String> [C++]

A string array that packages arguments to the script function.

Return value

Type: System.String [.NET] | Platform::String [C++]

The result of the script invocation.

Remarks

The invoked script can return only string values.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

End of client support

Windows 8.1

End of server support

Windows Server 2012 R2

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

WebView
InvokeScriptAsync

 

 

Show:
© 2014 Microsoft