Share via


IJSRuntime Interface

Definition

Represents an instance of a JavaScript runtime to which calls may be dispatched.

public interface class IJSRuntime
public interface IJSRuntime
type IJSRuntime = interface
Public Interface IJSRuntime
Derived

Methods

GetValueAsync<TValue>(String, CancellationToken)

Reads the value of the specified JavaScript property asynchronously.

GetValueAsync<TValue>(String)

Reads the value of the specified JavaScript property asynchronously.

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

Invokes the specified JavaScript function asynchronously.

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 timeout, or no timeout, consider using InvokeAsync<TValue>(String, CancellationToken, Object[]).

InvokeNewAsync(String, CancellationToken, Object[])

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

InvokeNewAsync(String, Object[])

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

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.

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.

Extension Methods

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