Share via


WebView.InvokeScript(String, String[]) Méthode

Définition

Notes

InvokeScript peut être modifié ou indisponible pour les versions après Windows 8.1. Utilisez plutôt InvokeScriptAsync.

Exécute la fonction de script spécifiée à partir du code HTML actuellement chargé, avec des arguments spécifiques.

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

Paramètres

scriptName
String

Platform::String

winrt::hstring

Nom de la fonction de script à appeler.

arguments

String[]

Platform::String[]

winrt::hstring[]

Tableau de chaînes qui empaquette les arguments à la fonction de script.

Retours

String

Platform::String

winrt::hstring

Résultat de l’appel de script.

Attributs

Remarques

Le script appelé peut retourner seulement des valeurs de chaîne.

S’applique à

Voir aussi