Top-level await
Widely available since 2024-03-20
The await
keyword, when used at the top level of a module (outside of an async function), delays parent module execution until after a promise fulfills.
Learning resources on MDN
Browser support
- Chrome 89 Released on 2021-03-02
- Chrome Android 89 Released on 2021-03-02
- Edge 89 Released on 2021-03-04
- Firefox 89 Released on 2021-06-01
- Firefox for Android 89 Released on 2021-06-01
- Safari 15 Released on 2021-09-20
- Safari on iOS 15 Released on 2021-09-20
Specifications
- ECMAScript Language Specification (#sec-async-function-definitions), from TC39 (Ecma International).