Share via


JSInProcessRuntime Class

Definition

Abstract base class for an in-process JavaScript runtime.

public ref class JSInProcessRuntime abstract : Microsoft::JSInterop::JSRuntime, Microsoft::JSInterop::IJSInProcessRuntime
public abstract class JSInProcessRuntime : Microsoft.JSInterop.JSRuntime, Microsoft.JSInterop.IJSInProcessRuntime
type JSInProcessRuntime = class
    inherit JSRuntime
    interface IJSInProcessRuntime
    interface IJSRuntime
Public MustInherit Class JSInProcessRuntime
Inherits JSRuntime
Implements IJSInProcessRuntime
Inheritance
JSInProcessRuntime
Derived
Implements

Constructors

JSInProcessRuntime()

Initializes a new instance of JSInProcessRuntime.

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.

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

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

Invokes the specified JavaScript function synchronously.

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)

Performs a synchronous function invocation.

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