Implement ReadableStream getIterator() and [@@asyncIterator] methods
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
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
Updated•5 years ago
|
Note that https://github.com/whatwg/streams/pull/1035 will rename getIterator() to values().
Comment 3•4 years ago
|
||
Any updates regarding this?
Comment 4•4 years ago
|
||
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.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Description
•