-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimum viable ReadableStream. #1761
Minimum viable ReadableStream. #1761
Conversation
No methods or attributes are mapped (yet). This is mostly useful for constructing a `Response` from another one's body in a streaming fashion.
The two CI failures also seem to be happening on master and other PRs, so I don't think they're related to this change. |
Thanks for the PR! I suspect though this is probably the same as #1746 in that it may be blocked on us gating access to these unstable APIs? I suspect |
It's a WHATWG spec; I don't think they do stages. It's supported out of the box (i.e., without flags) in Firefox and Chromium, though, so I'd be very surprised if there were any changes in the pipeline that would break this MVP without also impacting Web compatibility. The individual methods may be a bit iffier, but just passing it about as an opaque object should be fine, IMO. |
Ah ok makes sense! If this doesn't add any methods though, is this buying us much today? |
Yes - it allows constructing a |
Ah ok, nice! To confirm, have you verified that these edits to the webidl aren't API breaking changes for the generated code? |
Is there a way to do that mechanically? I've run the tests locally and they pass, but, as some famous guy said, testing can only prove the presence of bugs, not their absence. Using the Mark I Eyeball (human):
|
Ok, sounds reasonable to me! |
Hi! 👋 I'm interested in helping bridge the gap between JavaScript I know it's still very early since the Unfortunately, since the streams spec does not yet have an official WebIDL definition, I can't really open a PR for this just yet. Although the classes already have well-defined names ( If anyone else is interested in this kind of stuff or wants to continue from my work-in-progress branch, feel free to let me know. 😄 |
Thanks for thie @MattiasBuelens! FWIW the WebIDL is just generating Additionally I think given the stability of the |
Right, of course! 😅 I can make a crate that defines the JS bindings internally, so they don't have to be part of any public API just yet. I'll give that a try.
Yeah, I'll first start working on my own crate for streams interoperability. If it works out, we can always look into merging it into another crate later on. Thanks for the input! 😄 |
@MattiasBuelens That sounds like a good crate to add to gloo. |
Quick update: I've just published the first version of
The API is still somewhat experimental, so I'd love to hear your input. I want to make this a part of gloo at some point (and deprecate my crate), but I think it's better to iterate a bit more first before I draft up a proper RFC. In other news: whatwg/streams#963 has landed recently, and the streams specification now has an official WebIDL definition! I'm currently working on a PR to add these definitions to |
No methods or attributes are mapped (yet).
This is mostly useful for constructing a
Response
from another one'sbody in a streaming fashion.
--
The Streams spec doesn't currently use WebIDL (whatwg/streams#963) and a quick lock didn't find a ready-made
ReadableStream.webidl
in Firefox or Chromium, so this is doing the smallest thing that could possibly be useful (and would, in fact, be useful to me).