I really believe that it is something related to the scope within the browser. Anyway, there is a proposal to implement βawaitβ in the global scope: ECMAScript proposal: Top-level await, currently in phase 3, but it contains some interesting discussions about this implementation: Top-level await is a footgun π£π«.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I really believe that it is something related to the scope within the browser. Anyway, there is a proposal to implement βawaitβ in the global scope: ECMAScript proposal: Top-level await, currently in phase 3, but it contains some interesting discussions about this implementation: Top-level await is a footgun π£π«.