InvokeScript method
TOC
Collapse the table of content
Expand the table of content

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 Function InvokeScript(
  scriptName As String,  
  arguments As String() 
) As String

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 (Windows 10 device family)

Device family

API contract

Namespace

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

Metadata

Requirements (Windows 8.x and Windows Phone 8.x)

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:
© 2016 Microsoft