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, 
  Array<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

None supported

Minimum supported server

None supported

Minimum supported phone

None supported

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