Implement ReadableStream.from
Categories
(Core :: DOM: Streams, task, P3)
Tracking
()
People
(Reporter: evilpies, Assigned: evilpies)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
The static method ReadableStream.from is still waiting to be merged into the spec. I wrote an implementation to evaluate the design.
My observations:
- We don't actually expose any of the Iterator functionally outside of self-hosting and mostly just do everything in bytecode. This made interacting with iterators from C++ not really possible or at least more difficult
- To implement the cancelAlgorithm we would need to additionally expose
GetMethodwhich is currently self-hosted (except for Proxies?). It's unfortunate this this doesn't just useIteratorClose, but I think this might be related to having the return value of thereturn()call available?
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Wow, this is a really nice piece of work. '
To your second point, looking at the contract for an underlying source cancel promise, it's weird that unlike almost all the other cancel algorithms its producing a complicated IteratorResult value; perhaps the feedback here from us ought to just be "Use {Async}IteratorClose, and either have the promise be undefined or throw."
Updated•4 years ago
|
| Comment hidden (off-topic) |
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 4•3 years ago
|
||
ReadableStream.from was merged into the spec proper yesterday. I've updated the patch and we are passing everything on https://wpt.live/streams/readable-streams/from.any.html.
| Assignee | ||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Nice!
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 8•3 years ago
|
||
| bugherder | ||
Comment 10•3 years ago
|
||
Is this something we should call out in the Fx117 relnotes?
I wonder all dev-doc-needed should also have relnote.
| Assignee | ||
Comment 12•3 years ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Normally I wouldn't call this really notable, but we seem to be documenting similar stuff in e.g. 115
[Affects Firefox for Android]: yes
[Suggested wording]: The ReadableStream.from allows creating a ReadableStream from an (async) iterable.
[Links (documentation, blog post, etc)]: We probably want to link to MDN when ready.
Comment 14•3 years ago
|
||
FF117 MDN docs for this can be tracked in https://github.com/mdn/content/issues/28282
Comment 15•3 years ago
|
||
FF117 MDN docs work can be tracked in https://github.com/mdn/content/issues/28282
Updated•3 years ago
|
Description
•