WebAssemblyJSRuntime 类

定义

为 Mono WebAssembly 运行时上运行的应用程序提供调用 JavaScript 函数的方法。

public ref class WebAssemblyJSRuntime abstract : Microsoft::JSInterop::JSInProcessRuntime
public abstract class WebAssemblyJSRuntime : Microsoft.JSInterop.JSInProcessRuntime
public abstract class WebAssemblyJSRuntime : Microsoft.JSInterop.JSInProcessRuntime, Microsoft.JSInterop.IJSUnmarshalledRuntime
type WebAssemblyJSRuntime = class
    inherit JSInProcessRuntime
type WebAssemblyJSRuntime = class
    inherit JSInProcessRuntime
    interface IJSUnmarshalledRuntime
Public MustInherit Class WebAssemblyJSRuntime
Inherits JSInProcessRuntime
Public MustInherit Class WebAssemblyJSRuntime
Inherits JSInProcessRuntime
Implements IJSUnmarshalledRuntime
继承
WebAssemblyJSRuntime
实现

构造函数

WebAssemblyJSRuntime()

初始化 WebAssemblyJSRuntime 的新实例。

属性

DefaultAsyncTimeout

获取或设置异步 JavaScript 调用的默认超时。

(继承自 JSRuntime)
JsonSerializerOptions

JsonSerializerOptions获取用于序列化和反序列化互操作有效负载的 。

(继承自 JSRuntime)

方法

BeginInvokeJS(Int64, String, String)

开始异步函数调用。

BeginInvokeJS(Int64, String, String)

开始异步函数调用。

(继承自 JSRuntime)
BeginInvokeJS(Int64, String, String, JSCallResultType, Int64)

开始异步函数调用。

BeginInvokeJS(Int64, String, String, JSCallResultType, Int64)

开始异步函数调用。

(继承自 JSRuntime)
Dispose()

释放 JSRuntime。

(继承自 JSRuntime)
EndInvokeDotNet(DotNetInvocationInfo, DotNetInvocationResult)

完成从 JavaScript 到 .NET 的异步 JS 互操作调用

Invoke<TValue>(String, Object[])

同步调用指定的 JavaScript 函数。

(继承自 JSInProcessRuntime)
InvokeAsync<TValue>(String, CancellationToken, Object[])

异步调用指定的 JavaScript 函数。

(继承自 JSRuntime)
InvokeAsync<TValue>(String, Object[])

异步调用指定的 JavaScript 函数。

JSRuntime 将根据 中 DefaultAsyncTimeout配置的值对此操作应用超时。 若要调度具有不同或没有超时的调用,请考虑使用 InvokeAsync<TValue>(String, CancellationToken, Object[])

(继承自 JSRuntime)
InvokeJS(String, String)

执行同步函数调用。

InvokeJS(String, String)

执行同步函数调用。

(继承自 JSInProcessRuntime)
InvokeJS(String, String, JSCallResultType, Int64)

执行同步函数调用。

InvokeJS(String, String, JSCallResultType, Int64)

执行同步函数调用。

(继承自 JSInProcessRuntime)
InvokeUnmarshalled<T0,T1,T2,TResult>(String, T0, T1, T2)
已过时.

调用使用指定标识符注册的 JavaScript 函数。

InvokeUnmarshalled<T0,T1,TResult>(String, T0, T1)
已过时.

调用使用指定标识符注册的 JavaScript 函数。

InvokeUnmarshalled<T0,TResult>(String, T0)
已过时.

调用使用指定标识符注册的 JavaScript 函数。

InvokeUnmarshalled<TResult>(String)
已过时.

调用使用指定标识符注册的 JavaScript 函数。

ReadJSDataAsStreamAsync(IJSStreamReference, Int64, CancellationToken)

Stream为 表示jsStreamReference的数据引用提供 。

(继承自 JSRuntime)
ReceiveByteArray(Int32, Byte[])

接受从 JS 传输到 DotNet 的字节数组数据。

(继承自 JSRuntime)
SendByteArray(Int32, Byte[])

将字节数组从 .NET 传输到 JS。

SendByteArray(Int32, Byte[])

将字节数组从 .NET 传输到 JS。

(继承自 JSRuntime)
TransmitStreamAsync(Int64, DotNetStreamReference)

将流数据从 .NET 传输到 JS。 子类应重写此方法并提供将数据传输到 JS 并调用 DotNet.jsCallDispatcher.supplyDotNetStream 的实现。

(继承自 JSRuntime)

扩展方法

InvokeVoid(IJSInProcessRuntime, String, Object[])

同步调用指定的 JavaScript 函数。

InvokeAsync<TValue>(IJSRuntime, String, Object[])

异步调用指定的 JavaScript 函数。

JSRuntime 将根据 中 DefaultAsyncTimeout配置的值对此操作应用超时。 若要调度具有不同超时或无超时的调用,请考虑使用 InvokeAsync<TValue>(String, CancellationToken, Object[])

InvokeAsync<TValue>(IJSRuntime, String, CancellationToken, Object[])

异步调用指定的 JavaScript 函数。

InvokeAsync<TValue>(IJSRuntime, String, TimeSpan, Object[])

异步调用指定的 JavaScript 函数。

InvokeVoidAsync(IJSRuntime, String, Object[])

异步调用指定的 JavaScript 函数。

InvokeVoidAsync(IJSRuntime, String, CancellationToken, Object[])

异步调用指定的 JavaScript 函数。

InvokeVoidAsync(IJSRuntime, String, TimeSpan, Object[])

异步调用指定的 JavaScript 函数。

适用于