Skip to content

javascript.operators.await - Top level await isn't properly supported in Safari #20426

@confususs

Description

@confususs

What type of issue is this?

Browser bug (a bug with a feature that may impact site compatibility)

What information was incorrect, unhelpful, or incomplete?

I believe the information on top-level await support on Safari is incorrect.

There is a bug in Safari (or actually Webkit) that prevents you from using top level await when multiple modules do a simultaneous import of a module which contains a top level await. (https://bugs.webkit.org/show_bug.cgi?id=242740)

So, while top level await is supported in simple cases on Safari, when building a more complex web app where multiple modules rely on one another, you'll start to run into problems. I believe this heavily impacts site compatibility.

What browsers does this problem apply to, if applicable?

Safari

What did you expect to see?

Expected to see "partial support" for "Use at module top level" for "await" for webkit-based browsers.

Did you test this? If so, how?

Yes, you could read more on this and reproduce it using the attachment for the bug I filed @ webkit: https://bugs.webkit.org/show_bug.cgi?id=242740

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

The table:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#browser_compatibility

Related bug:
https://bugs.webkit.org/show_bug.cgi?id=242740

Do you have anything more you want to share?

https://bugs.webkit.org/attachment.cgi?id=460889

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await

MDN metadata

MDN page report details
  • Query: javascript.operators.await
  • Report started: 2023-07-27T08:47:54.967Z

Metadata

Metadata

Assignees

Labels

data:jsCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScriptp2High priority – Community PRs highly encouraged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions