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)

Begins an asynchronous function invocation.

BeginInvokeJS(Int64, String, String)

Begins an asynchronous function invocation.

(Inherited from JSRuntime)
BeginInvokeJS(JSInvocationInfo)

Begins an asynchronous function invocation.

Dispose()

Dispose the JSRuntime.

(Inherited from JSRuntime)
EndInvokeDotNet(DotNetInvocationInfo, DotNetInvocationResult)

Completes an async JS interop call from JavaScript to .NET

GetValue<TValue>(String)

Reads the value of the specified JavaScript property synchronously.

(Inherited from JSInProcessRuntime)
GetValueAsync<TValue>(String, CancellationToken)

Reads the value of the specified JavaScript property asynchronously.

(Inherited from JSRuntime)
GetValueAsync<TValue>(String)

Reads the value of the specified JavaScript property asynchronously.

(Inherited from JSRuntime)
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(JSInvocationInfo)

Performs a synchronous function invocation.

InvokeJS(String, String, JSCallResultType, Int64)

Performs a synchronous function invocation.

InvokeJS(String, String)

Performs a synchronous function invocation.

InvokeJS(String, String)

Performs a synchronous function invocation.

(Inherited from JSInProcessRuntime)
InvokeNew(String, Object[])

Invokes the specified JavaScript constructor function synchronously. The function is invoked with the new operator.

(Inherited from JSInProcessRuntime)
InvokeNewAsync(String, CancellationToken, Object[])

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

(Inherited from JSRuntime)
InvokeNewAsync(String, Object[])

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

(Inherited from JSRuntime)
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.

SetValue<TValue>(String, TValue)

Updates the value of the specified JavaScript property synchronously. If the property is not defined on the target object, it will be created.

(Inherited from JSInProcessRuntime)
SetValueAsync<TValue>(String, TValue, CancellationToken)

Updates the value of the specified JavaScript property asynchronously. If the property is not defined on the target object, it will be created.

(Inherited from JSRuntime)
SetValueAsync<TValue>(String, TValue)

Updates the value of the specified JavaScript property asynchronously. If the property is not defined on the target object, it will be created.

(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.

InvokeNewAsync(IJSRuntime, String, Object[])

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

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

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

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

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

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