New issue
Advanced search Search tips

Issue 821673 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 863656
Owner:
Closed: Sep 25
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



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 .
 

Comment 1 by gov...@chromium.org, Mar 14 2018

Cc: dgozman@chromium.org
Labels: Needs-Triage-M65 Needs-Triage-M66
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
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)

dAPfarz.png
40.0 KB View Download
Mergedinto: 863656
Status: Duplicate (was: Assigned)
We should try to roll acorn.

Sign in to add a comment