Allow the `await` keyword at the top-level within JavaScript modules.
Motivation
Allows more seamless integration of async calls into the module loading process. Today this is accomplished by wrapping modules in async functions, but this pushes complexity into dependent modules and exposes implementation details.
Demo
Documentation
Specification
Specification being incubated in a Community Group
Status in Chromium
Enabled by default
(tracking bug)
Consensus & Standardization
After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.
- Worth prototyping
- Positive
- Positive
Owners
Search tags
top_level_await,Last updated on 2022-01-14