Issue metadata
Sign in to add a comment
|
Request: Allow for-await-of loops in additional to other forms of top-level await in devtools console
Reported by
thejames...@gmail.com,
Mar 14 2018
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36
Steps to reproduce the problem:
Currently `await <Expression>` is supported in the devtools console. It would be nice if `for await (... of ...) { ... }` were supported as it's quite tedious to have to create wrapper functions for inspecting async iterators.
What is the expected behavior?
What went wrong?
Currently trying to use for-await-of loops in the devtools just fails with an error (SyntaxError: Unexpected reserved word).
Did this work before? No
Chrome version: 66 Channel: dev
OS Version:
Flash Version:
Interestingly if you also include an await statement like so:
await null; for await (const item of someAsyncIterable) {
console.log(item)
}
It fails with the error "SyntaxError: await is only valid in async function" instead which means this might be related to bug #807528 .
,
Mar 14 2018
,
Jul 13
Perhaps I should create a separate bug report for this, but a plain old `await` doesn't work if there's a comment underneath it (see image). Version 67.0.3396.99 (Official Build) (64-bit)
,
Sep 25
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by gov...@chromium.org
, Mar 14 2018Labels: Needs-Triage-M65 Needs-Triage-M66