Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

IJSRuntime Interface

Definition

Namespace:
Microsoft.JSInterop
Assembly:
Microsoft.JSInterop.dll
Package:
Microsoft.JSInterop v10.0.0-preview.5.25277.114
Package:
Microsoft.JSInterop v3.0.3
Package:
Microsoft.JSInterop v3.1.18
Package:
Microsoft.JSInterop v5.0.9
Package:
Microsoft.JSInterop v6.0.6
Package:
Microsoft.JSInterop v7.0.5
Package:
Microsoft.JSInterop v8.0.0
Package:
Microsoft.JSInterop v9.0.2
Source:
IJSRuntime.cs
Source:
IJSRuntime.cs
Source:
IJSRuntime.cs
Source:
IJSRuntime.cs
Source:
IJSRuntime.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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 inDefaultAsyncTimeout. To dispatch a call with a different timeout, or no timeout,consider usingInvokeAsync<TValue>(String, CancellationToken, Object[]).

InvokeNewAsync(String, CancellationToken, Object[])

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

InvokeNewAsync(String, Object[])

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with thenew 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 inDefaultAsyncTimeout. To dispatch a call with a different timeout, or no timeout,consider usingInvokeAsync<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 thenew operator.

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

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

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

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with thenew 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


Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo