編輯

共用方式為


JSHost Class

Definition

Represents the JavaScript host environment where the .NET runtime is currently operating.

public ref class JSHost abstract sealed
[System.Runtime.Versioning.SupportedOSPlatform("browser")]
public static class JSHost
[<System.Runtime.Versioning.SupportedOSPlatform("browser")>]
type JSHost = class
Public Class JSHost
Inheritance
JSHost
Attributes

Properties

DotnetInstance

Returns a proxy for the JavaScript module that contains the .NET runtime.

GlobalThis

Returns a proxy for the globalThis JavaScript host object.

Methods

ImportAsync(String, String, CancellationToken)

Downloads and instantiates an ES6 module from the provided URL, via the JavaScript host's dynamic import API. If a module with the provided moduleName has previously been instantiated, it will be returned instead.

Applies to