WebView.InvokeScript(String, String[]) 메서드

정의

참고

invokeScript는 Windows 8.1 후 릴리스에서 변경되거나 사용할 수 없습니다. 대신 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

스크립트 호출의 결과입니다.

특성

설명

호출된 스크립트는 문자열 값만 반환할 수 있습니다.

적용 대상

추가 정보