Implement ReadableStream.from
Categories
(Core :: DOM: Streams, task, P3)
Tracking
()
People
(Reporter: evilpie, Assigned: evilpie)
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
GetMethod
which 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•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Comment 2•2 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•2 years ago
|
Comment hidden (off-topic) |
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•1 year 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•1 year ago
|
Comment 5•1 year ago
|
||
Nice!
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
bugherder |
Comment 10•1 year ago
|
||
Is this something we should call out in the Fx117 relnotes?
Comment 11•1 year ago
|
||
I wonder all dev-doc-needed should also have relnote.
Assignee | ||
Comment 12•1 year 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•1 year ago
|
||
FF117 MDN docs for this can be tracked in https://github.com/mdn/content/issues/28282
Comment 15•1 year ago
|
||
FF117 MDN docs work can be tracked in https://github.com/mdn/content/issues/28282
Updated•1 year ago
|
Description
•