Closed Bug 1525852 Opened 5 years ago Closed 2 years ago

Implement ReadableStream getIterator() and [@@asyncIterator] methods

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1734244

People

(Reporter: ricea, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36

Steps to reproduce:

Attempted to iterate over a ReadableStream:

for await (const chunk of response.body) {
console.log(chunk);
}

Actual results:

Didn't work due to not being implemented.

Expected results:

Should work because it is implemented.

Standard change: https://github.com/whatwg/streams/pull/980
Tests: https://github.com/web-platform-tests/wpt/pull/15097

Issue 1496770 (import of the test changes) is related.

Priority: -- → P3

Note that https://github.com/whatwg/streams/pull/1035 will rename getIterator() to values().

Any updates regarding this?

No particular updates.

I'm the most recent person to do streams stuff, and I'm currently finishing up bug 1474543, which is basically done but is blocked by bug 1502355. However, I was part of recent layoffs, and my free-time projects are unlikely to include this work. (I prefer implementing stuff that offers new functionality -- syntactic sugar is nice, don't get me wrong, but making the impossible possible is more valuable than something you can already achieve.)

I would suggest you (keep?) writing your own implementation, that can use this if it exists or that reimplements it if necessary.

Type: defect → task
Type: task → enhancement
Blocks: streams-meta
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.