Share via


WebAssemblyJSRuntime Class

Definition

Provides methods for invoking JavaScript functions for applications running on the Mono WebAssembly runtime.

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
Inheritance
WebAssemblyJSRuntime
Implements

Constructors

WebAssemblyJSRuntime()

Initializes a new instance of WebAssemblyJSRuntime.

Properties

DefaultAsyncTimeout

Gets or sets the default timeout for asynchronous JavaScript calls.

(Inherited from JSRuntime)
JsonSerializerOptions

Gets the JsonSerializerOptions used to serialize and deserialize interop payloads.

(Inherited from JSRuntime)

Methods

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

Begins an asynchronous function invocation.

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

Begins an asynchronous function invocation.

(Inherited from JSRuntime)
BeginInvokeJS(Int64, String, String)

Begins an asynchronous function invocation.

BeginInvokeJS(Int64, String, String)

Begins an asynchronous function invocation.

(Inherited from JSRuntime)
Dispose()

Dispose the JSRuntime.

(Inherited from JSRuntime)
EndInvokeDotNet(DotNetInvocationInfo, DotNetInvocationResult)

Completes an async JS interop call from JavaScript to .NET

Invoke<TValue>(String, Object[])

Invokes the specified JavaScript function synchronously.

(Inherited from JSInProcessRuntime)
InvokeAsync<TValue>(String, CancellationToken, Object[])

Invokes the specified JavaScript function asynchronously.

(Inherited from JSRuntime)
InvokeAsync<TValue>(String, Object[])

Invokes the specified JavaScript function asynchronously.

JSRuntime will apply timeouts to this operation based on the value configured in DefaultAsyncTimeout. To dispatch a call with a different, or no timeout, consider using InvokeAsync<TValue>(String, CancellationToken, Object[]).

(Inherited from JSRuntime)
InvokeJS(String, String, JSCallResultType, Int64)

Performs a synchronous function invocation.

InvokeJS(String, String, JSCallResultType, Int64)

Performs a synchronous function invocation.

(Inherited from JSInProcessRuntime)
InvokeJS(String, String)

Performs a synchronous function invocation.

InvokeJS(String, String)

Performs a synchronous function invocation.

(Inherited from JSInProcessRuntime)
InvokeUnmarshalled<T0,T1,T2,TResult>(String, T0, T1, T2)
Obsolete.

Invokes the JavaScript function registered with the specified identifier.

InvokeUnmarshalled<T0,T1,TResult>(String, T0, T1)
Obsolete.

Invokes the JavaScript function registered with the specified identifier.

InvokeUnmarshalled<T0,TResult>(String, T0)
Obsolete.

Invokes the JavaScript function registered with the specified identifier.

InvokeUnmarshalled<TResult>(String)
Obsolete.

Invokes the JavaScript function registered with the specified identifier.

ReadJSDataAsStreamAsync(IJSStreamReference, Int64, CancellationToken)

Provides a Stream for the data reference represented by jsStreamReference.

(Inherited from JSRuntime)
ReceiveByteArray(Int32, Byte[])

Accepts the byte array data being transferred from JS to DotNet.

(Inherited from JSRuntime)
SendByteArray(Int32, Byte[])

Transfers a byte array from .NET to JS.

SendByteArray(Int32, Byte[])

Transfers a byte array from .NET to JS.

(Inherited from JSRuntime)
TransmitStreamAsync(Int64, DotNetStreamReference)

Transmits the stream data from .NET to JS. Subclasses should override this method and provide an implementation that transports the data to JS and calls DotNet.jsCallDispatcher.supplyDotNetStream.

(Inherited from JSRuntime)

Extension Methods

InvokeVoid(IJSInProcessRuntime, String, Object[])

Invokes the specified JavaScript function synchronously.

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

Invokes the specified JavaScript function asynchronously.

JSRuntime will apply timeouts to this operation based on the value configured in DefaultAsyncTimeout. To dispatch a call with a different timeout, or no timeout, consider using InvokeAsync<TValue>(String, CancellationToken, Object[]).

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

Invokes the specified JavaScript function asynchronously.

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

Invokes the specified JavaScript function asynchronously.

InvokeVoidAsync(IJSRuntime, String, Object[])

Invokes the specified JavaScript function asynchronously.

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

Invokes the specified JavaScript function asynchronously.

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

Invokes the specified JavaScript function asynchronously.

Applies to