Share via


WebAssemblyJSRuntime Classe

Définition

Fournit des méthodes pour appeler des fonctions JavaScript pour les applications s’exécutant sur le runtime Mono WebAssembly.

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
Héritage
WebAssemblyJSRuntime
Implémente

Constructeurs

WebAssemblyJSRuntime()

Initialise une nouvelle instance de WebAssemblyJSRuntime.

Propriétés

DefaultAsyncTimeout

Obtient ou définit le délai d’expiration par défaut pour les appels JavaScript asynchrones.

(Hérité de JSRuntime)
JsonSerializerOptions

Obtient le JsonSerializerOptions utilisé pour sérialiser et désérialiser les charges utiles d’interopérabilité.

(Hérité de JSRuntime)

Méthodes

BeginInvokeJS(Int64, String, String)

Commence un appel de fonction asynchrone.

BeginInvokeJS(Int64, String, String)

Commence un appel de fonction asynchrone.

(Hérité de JSRuntime)
BeginInvokeJS(Int64, String, String, JSCallResultType, Int64)

Commence un appel de fonction asynchrone.

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

Commence un appel de fonction asynchrone.

(Hérité de JSRuntime)
Dispose()

Supprimez le JSRuntime.

(Hérité de JSRuntime)
EndInvokeDotNet(DotNetInvocationInfo, DotNetInvocationResult)

Termine un appel d’interopérabilité JS asynchrone de JavaScript vers .NET

Invoke<TValue>(String, Object[])

Appelle la fonction JavaScript spécifiée de manière synchrone.

(Hérité de JSInProcessRuntime)
InvokeAsync<TValue>(String, CancellationToken, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

(Hérité de JSRuntime)
InvokeAsync<TValue>(String, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

JSRuntime applique des délais d’expiration à cette opération en fonction de la valeur configurée dans DefaultAsyncTimeout. Pour distribuer un appel avec un autre, ou sans délai d’expiration, envisagez d’utiliser InvokeAsync<TValue>(String, CancellationToken, Object[]).

(Hérité de JSRuntime)
InvokeJS(String, String)

Effectue un appel de fonction synchrone.

InvokeJS(String, String)

Effectue un appel de fonction synchrone.

(Hérité de JSInProcessRuntime)
InvokeJS(String, String, JSCallResultType, Int64)

Effectue un appel de fonction synchrone.

InvokeJS(String, String, JSCallResultType, Int64)

Effectue un appel de fonction synchrone.

(Hérité de JSInProcessRuntime)
InvokeUnmarshalled<T0,T1,T2,TResult>(String, T0, T1, T2)
Obsolète.

Appelle la fonction JavaScript inscrite avec l’identificateur spécifié.

InvokeUnmarshalled<T0,T1,TResult>(String, T0, T1)
Obsolète.

Appelle la fonction JavaScript inscrite avec l’identificateur spécifié.

InvokeUnmarshalled<T0,TResult>(String, T0)
Obsolète.

Appelle la fonction JavaScript inscrite avec l’identificateur spécifié.

InvokeUnmarshalled<TResult>(String)
Obsolète.

Appelle la fonction JavaScript inscrite avec l’identificateur spécifié.

ReadJSDataAsStreamAsync(IJSStreamReference, Int64, CancellationToken)

Fournit un Stream pour la référence de données représentée par jsStreamReference.

(Hérité de JSRuntime)
ReceiveByteArray(Int32, Byte[])

Accepte les données de tableau d’octets transférées de JS vers DotNet.

(Hérité de JSRuntime)
SendByteArray(Int32, Byte[])

Transfère un tableau d’octets de .NET vers JS.

SendByteArray(Int32, Byte[])

Transfère un tableau d’octets de .NET vers JS.

(Hérité de JSRuntime)
TransmitStreamAsync(Int64, DotNetStreamReference)

Transmet les données de flux de .NET à JS. Les sous-classes doivent remplacer cette méthode et fournir une implémentation qui transporte les données vers JS et appelle DotNet.jsCallDispatcher.supplyDotNetStream.

(Hérité de JSRuntime)

Méthodes d’extension

InvokeVoid(IJSInProcessRuntime, String, Object[])

Appelle la fonction JavaScript spécifiée de manière synchrone.

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

Appelle la fonction JavaScript spécifiée de manière asynchrone.

JSRuntime applique des délais d’expiration à cette opération en fonction de la valeur configurée dans DefaultAsyncTimeout. Pour distribuer un appel avec un délai d’expiration différent, ou sans délai d’expiration, envisagez d’utiliser InvokeAsync<TValue>(String, CancellationToken, Object[]).

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

Appelle la fonction JavaScript spécifiée de manière asynchrone.

InvokeAsync<TValue>(IJSRuntime, String, TimeSpan, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

InvokeVoidAsync(IJSRuntime, String, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

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

Appelle la fonction JavaScript spécifiée de manière asynchrone.

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

Appelle la fonction JavaScript spécifiée de manière asynchrone.

S’applique à