JSInProcessRuntime.InvokeJS 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| InvokeJS(JSInvocationInfo) |
執行同步函式調用。 |
| InvokeJS(String, String) |
執行同步函式調用。 |
| InvokeJS(String, String, JSCallResultType, Int64) |
執行與呼叫類型 FunctionCall的同步函式調用。 想要更多設定選項,請使用 overload InvokeJS(JSInvocationInfo)。 |
InvokeJS(JSInvocationInfo)
執行同步函式調用。
protected virtual string? InvokeJS(in Microsoft.JSInterop.Infrastructure.JSInvocationInfo? invocationInfo);
abstract member InvokeJS : JSInvocationInfo -> string
override this.InvokeJS : JSInvocationInfo -> string
Protected Overridable Function InvokeJS (invocationInfo As JSInvocationInfo) As String
參數
- invocationInfo
- JSInvocationInfo
互操作通話的設定。
傳回
一個 JSON 表示結果。
適用於
InvokeJS(String, String)
執行同步函式調用。
protected:
abstract System::String ^ InvokeJS(System::String ^ identifier, System::String ^ argsJson);
protected:
virtual System::String ^ InvokeJS(System::String ^ identifier, System::String ^ argsJson);
protected virtual string? InvokeJS(string identifier, string? argsJson);
protected abstract string InvokeJS(string identifier, string argsJson);
abstract member InvokeJS : string * string -> string
override this.InvokeJS : string * string -> string
abstract member InvokeJS : string * string -> string
Protected Overridable Function InvokeJS (identifier As String, argsJson As String) As String
Protected MustOverride Function InvokeJS (identifier As String, argsJson As String) As String
參數
- identifier
- String
函式要調用的識別碼。
- argsJson
- String
參數的 JSON 表示。
傳回
一個 JSON 表示結果。
適用於
InvokeJS(String, String, JSCallResultType, Int64)
執行與呼叫類型 FunctionCall的同步函式調用。 想要更多設定選項,請使用 overload InvokeJS(JSInvocationInfo)。
protected:
abstract System::String ^ InvokeJS(System::String ^ identifier, System::String ^ argsJson, Microsoft::JSInterop::JSCallResultType resultType, long targetInstanceId);
protected abstract string? InvokeJS(string identifier, string? argsJson, Microsoft.JSInterop.JSCallResultType resultType, long targetInstanceId);
abstract member InvokeJS : string * string * Microsoft.JSInterop.JSCallResultType * int64 -> string
Protected MustOverride Function InvokeJS (identifier As String, argsJson As String, resultType As JSCallResultType, targetInstanceId As Long) As String
參數
- identifier
- String
函式要調用的識別碼。
- argsJson
- String
參數的 JSON 表示。
- resultType
- JSCallResultType
召喚所期望的結果類型。
- targetInstanceId
- Int64
目標 JS 物件的實例 ID。
傳回
一個 JSON 表示結果。