ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript.V8
V8Settings Class
V8Settings Properties
EnableTopLevelAwait Property
GlobalFlags Property

# 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.5.0
Syntax
C#
VB
C++
F#
Copy

    [ObsoleteAttribute("V8 no longer supports Top-Level Await control. The feature is always enabled.")]
    public static bool EnableTopLevelAwait { get; set; }

    <ObsoleteAttribute("V8 no longer supports Top-Level Await control. The feature is always enabled.")>
    Public Shared Property EnableTopLevelAwait As Boolean
    	Get
    	Set

    public:
    [ObsoleteAttribute(L"V8 no longer supports Top-Level Await control. The feature is always enabled.")]
    static property bool EnableTopLevelAwait {
    	bool get ();
    	void set (bool value);
    }

    [<ObsoleteAttribute("V8 no longer supports Top-Level Await control. The feature is always enabled.")>]
    static member EnableTopLevelAwait : bool with 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

#### Reference

V8Settings Class
Microsoft.ClearScript.V8 Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft