WebUIView.InvokeScriptAsync(String, IIterable<String>) 方法

定义

使用特定参数从当前加载的 HTML 执行指定的脚本函数,作为异步操作。

public:
 virtual IAsyncOperation<Platform::String ^> ^ InvokeScriptAsync(Platform::String ^ scriptName, IIterable<Platform::String ^> ^ arguments) = InvokeScriptAsync;
IAsyncOperation<winrt::hstring> InvokeScriptAsync(winrt::hstring const& scriptName, IIterable<winrt::hstring> const& arguments);
public IAsyncOperation<string> InvokeScriptAsync(string scriptName, IEnumerable<string> arguments);
function invokeScriptAsync(scriptName, arguments)
Public Function InvokeScriptAsync (scriptName As String, arguments As IEnumerable(Of String)) As IAsyncOperation(Of String)

参数

scriptName
String

Platform::String

winrt::hstring

要调用的脚本函数的名称。

arguments

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

将参数打包到脚本函数的字符串数组。

返回

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

脚本调用的字符串结果。

实现

M:Windows.Web.UI.IWebViewControl.InvokeScriptAsync(System.String,System.Collections.Generic.IEnumerable{System.String}) M:Windows.Web.UI.IWebViewControl.InvokeScriptAsync(Platform::String,System.Collections.Generic.IEnumerable{Platform::String}) M:Windows.Web.UI.IWebViewControl.InvokeScriptAsync(winrt::hstring,System.Collections.Generic.IEnumerable{winrt::hstring})

适用于