You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Putting an await in a global module scope causes a syntax error, failing the validation (and thus submission on AMO). proposal-top-level-await was actually just updated to Stage 4, and works in Firefox 89 (which is to be released any day now) and Chrome.
So as far as mainline Firefox is concerned, this is valid.
I guess one could use this as a test file background.js:
importfoofrom'foo';awaitnull;exportconstbar=42;
What happened?
Critical validation error:
JavaScript syntax error
(Parsing as module error: Cannot use keyword 'await' outside an async function at ...)
(Parsing as script error: 'import' and 'export' may appear only with 'sourceType: module' at ...)
What did you expect to happen?
The JS file should be parsable.
Anything else we should know?
I had actually been holding back on porting my AMD modules to ES modules precisely because of the lack of an await before exporting. Now I ported my code, and can't upload it.
The text was updated successfully, but these errors were encountered:
Describe the problem and steps to reproduce it:
Putting an
await
in a global module scope causes a syntax error, failing the validation (and thus submission on AMO).proposal-top-level-await was actually just updated to Stage 4, and works in Firefox 89 (which is to be released any day now) and Chrome.
So as far as mainline Firefox is concerned, this is valid.
I guess one could use this as a test file
background.js
:What happened?
Critical validation error:
What did you expect to happen?
The JS file should be parsable.
Anything else we should know?
I had actually been holding back on porting my AMD modules to ES modules precisely because of the lack of an
await
beforeexport
ing. Now I ported my code, and can't upload it.The text was updated successfully, but these errors were encountered: