Intent to ship: Top Level Await

139 views
Skip to first unread message

Yulia Startsev

unread,
Mar 31, 2021, 7:05:37 AMMar 31
to dev-pl...@lists.mozilla.org
Top level await was prototyped in fall last year, and we are now confident
with the implementation and the specification to move forward with shipping
it. The proposal is in stage 3 of the TC39 Process[1]. There are no open
issues which we are concerned about.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1519100

Proposed Standard: https://tc39.es/proposal-top-level-await/

Proposal Repository: https://github.com/tc39/proposal-top-level-await
<https://github.com/tc39/proposal-logical-assignment/>

MDN: https://github.com/mdn/content/issues/297

Platform coverage: all platform, pref on by default

DevTools bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1680259

Other browsers: Enabled by default in chrome 89 [2], bug for JSC [3]

Testing: https://github.com/tc39/test262/pull/2274

Use cases: The proposal allows modules to pause and wait for asynchronous
work at the top level.
```js

import processData from "./foo.js";

const data = await fetch("/some/api/endpoint");

processData(data);

```

[1]: https://tc39.es/process-document/
[2]: https://www.chromestatus.com/feature/5767881411264512
[3]: https://bugs.webkit.org/show_bug.cgi?id=202484
<https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-logical-assignment-operators>
Reply all
Reply to author
Forward
0 new messages