WebView.InvokeScript(String, String[]) Methode

Definition

Hinweis

InvokeScript kann für Releases nach Windows 8.1 geändert oder nicht mehr verfügbar sein. Verwenden Sie stattdessen InvokeScriptAsync.

Führt die angegebene Skriptfunktion aus dem aktuell geladenen HTML-Code mit bestimmten Argumenten aus.

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

Parameter

scriptName
String

Platform::String

winrt::hstring

Der Name der skriptfunktion, die aufgerufen werden soll.

arguments

String[]

Platform::String[]

winrt::hstring[]

Ein Zeichenfolgenarray, das Argumente an die Skriptfunktion packt.

Gibt zurück

String

Platform::String

winrt::hstring

Das Ergebnis des Skriptaufrufs.

Attribute

Hinweise

Das aufgerufene Skript kann nur Zeichenfolgenwerte zurückgeben.

Gilt für:

Weitere Informationen