News for hackers. Stuff that matters.
Re:Top-level await in JavaScript is a footgun by bmeck on Wednesday September 14, 2016 @01:24PM (#12499225)
top level await is only possible in grammar w/ `await` as a reserved word. This is limited to Modules (type=module) and async functions. You can't put it in your click handler or random Script like the examples you gave.
Re:Top-level await in JavaScript is a footgun by xg15 on Wednesday September 14, 2016 @04:21PM (#12500907)
I wasn't aware of that restriction. That makes sense. Thanks for the info.