Click or drag to resize

V8SettingsEnableTopLevelAwait Property

Note: This API is now obsolete.

Enables or disables Top-Level Await.

Namespace: Microsoft.ClearScript.V8
Assembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.3.3
Syntax
[ObsoleteAttribute("V8 no longer supports Top-Level Await control. The feature is always enabled.")]
public static bool EnableTopLevelAwait { get; set; }

Property Value

Boolean
Remarks

Top-Level Await enables code at the outermost scope of an ECMAScript 6 module to be executed as an async function. When this feature is enabled, modules can await resources, causing importers to delay evaluation as necessary.

To enable Top-Level Await, set this property to true before instantiating V8ScriptEngine or V8Runtime for the first time. Subsequent reassignment will have no effect.

See Also