WebView.InvokeScript(String, String[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Note
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:
virtual Platform::String ^ InvokeScript(Platform::String ^ scriptName, Platform::Array <Platform::String ^> ^ arguments) = InvokeScript;
/// [Windows.Foundation.Metadata.Deprecated("Use InvokeScriptAsync instead of InvokeScript. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
winrt::hstring InvokeScript(winrt::hstring const& scriptName, winrt::array_view <winrt::hstring const&> const& arguments);
/// [Windows.Foundation.Metadata.Deprecated("Use InvokeScriptAsync instead of InvokeScript. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
winrt::hstring InvokeScript(winrt::hstring const& scriptName, winrt::array_view <winrt::hstring const&> const& arguments);
[Windows.Foundation.Metadata.Deprecated("Use InvokeScriptAsync instead of InvokeScript. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public string InvokeScript(string scriptName, string[] arguments);
[Windows.Foundation.Metadata.Deprecated("Use InvokeScriptAsync instead of InvokeScript. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public string InvokeScript(string scriptName, string[] arguments);
function invokeScript(scriptName, arguments)
Public Function InvokeScript (scriptName As String, arguments As String()) As String
Parameters
- scriptName
-
String
Platform::String
winrt::hstring
The name of the script function to invoke.
- arguments
-
String[]
Platform::String[]
winrt::hstring[]
A string array that packages arguments to the script function.
Returns
The result of the script invocation.
- Attributes
Remarks
The invoked script can return only string values.