MonoWebAssemblyJSRuntime Class

Definition

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

public ref class MonoWebAssemblyJSRuntime : Microsoft::JSInterop::JSInProcessRuntime
public class MonoWebAssemblyJSRuntime : Microsoft.JSInterop.JSInProcessRuntime
type MonoWebAssemblyJSRuntime = class
    inherit JSInProcessRuntime
Public Class MonoWebAssemblyJSRuntime
Inherits JSInProcessRuntime
Inheritance
MonoWebAssemblyJSRuntime

Constructors

MonoWebAssemblyJSRuntime()

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)

Begins an asynchronous function invocation.

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

Begins an asynchronous function invocation.

(Inherited from JSRuntime)
Dispose()

Dispose the JSRuntime.

(Inherited from JSRuntime)
EndInvokeDotNet(DotNetInvocationInfo, DotNetInvocationResult)
Initialize(MonoWebAssemblyJSRuntime)

Initializes the MonoWebAssemblyJSRuntime to be used to perform operations using DotNetDispatcher.

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)

Performs a synchronous function invocation.

InvokeJS(String, String, JSCallResultType, Int64)

Performs a synchronous function invocation.

(Inherited from JSInProcessRuntime)
InvokeUnmarshalled<T0,T1,T2,TRes>(String, T0, T1, T2)

Invokes the JavaScript function registered with the specified identifier.

InvokeUnmarshalled<T0,T1,TRes>(String, T0, T1)

Invokes the JavaScript function registered with the specified identifier.

InvokeUnmarshalled<T0,TRes>(String, T0)

Invokes the JavaScript function registered with the specified identifier.

InvokeUnmarshalled<TRes>(String)

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.

(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