Description
Summary
The top-level await feature (dist) may regress from Baseline widely available ("Baseline high") to not Baseline (aka limited availability), due to a bug in Safari. This has been temporarily blocked with an editorial override.
This issue is meant to determine if we're to follow the compat data or maintain an editorial override, allowing the feature to remain Baseline high.
Background
In Safari, simultaneous imports of a module with a top-level await fails with a ReferenceError
. This bug has been present since September 2021, when Safari first shipped top-level await (this is also the feature's keystone release).
However, the bug was not reported until later. In July 2022 (about 10 months after top-level await shipped), the bug's first public report to WebKit was filed (webkit bug 242740).
In July 2023, this issue was reported by developers to BCD.
In December 2024, we first published the top-level await feature (#2417), using data that did not reflect the Safari bug.
On April 29, 2025, BCD updated the data and marked Safari's support as partially implemented.
On May 2, 2025 the update landed in web-features. I withheld a release, pending discussion on the issue. In May 8, 2025's WebDX call, we decided to apply an override while we discuss the issue further, judging that a full regression from Baseline high to non-Baseline merited a closer review. I applied that (temporary) fix in #2954.
Since Februrary 2024, a PR to fix this bug in WebKit has been open (WebKit/WebKit#24122), though it's incomplete and unmerged. WebKit maintainers have commented on it, saying that there's work needed, but not scheduled, to fix this bug.
Owner's group questions
This status must be resolved by the web-features owners group. If we cannot reach consensus, then we may put it to a vote of the owner's group to resolve. The main questions follow:
-
Should we let the (temporary) editorial override stand?
That is, do we believe that the bug is a "showstopper" that should cause developers to think twice before using top-level await across browsers? Or do we think this is a minor bug that is not generally relevant to the Baseline audience?
-
Should we unlink the compat key from the top-level await feature?
Consumers may use a generated per-key status. In this case, this feature has a single key. Should we unpublish the per-key status for this key? Presently, we do not have a facility for overriding a per-key status (see Override individual BCD keys #1690).
Related links
- Webkit bug 242740 – [JSC] ReferenceError when multiple modules are simultaneously importing a module containing a top-level await
- [JSC] ReferenceError when multiple modules are simultaneously importing a module containing a top-level await WebKit/WebKit#24122
- javascript.operators.await - Top level await isn't properly supported in Safari mdn/browser-compat-data#20426
- javascript.operators.await - Add a note of partial top-level support in Safari mdn/browser-compat-data#26075
- Safari only partially supports top-level await mdn/browser-compat-data#26510
- Comment on BCD bump with regression #2921
- Reversion of preceding regression
- Baseline status regressions should require a note #1971