WebView.InvokeScript(String, String[]) メソッド

定義

注意

Windows 8.1後に、InvokeScript が変更されたり、リリースで使用できなくなったりする可能性があります。 代わりに、 InvokeScriptAsync を使用します。

特定の引数を使用して、現在読み込まれている HTML から指定されたスクリプト関数を実行します。

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

パラメーター

scriptName
String

Platform::String

winrt::hstring

呼び出すスクリプト関数の名前。

arguments

String[]

Platform::String[]

winrt::hstring[]

引数をスクリプト関数にパッケージ化する文字列配列。

戻り値

String

Platform::String

winrt::hstring

スクリプト呼び出しの結果。

属性

注釈

呼び出されたスクリプトは、文字列型の値のみを返すことができます。

適用対象

こちらもご覧ください