-
Notifications
You must be signed in to change notification settings - Fork 22.4k
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
Clarify the type of chunk parameter in ReadableStreamDefaultController #33562
Conversation
What's going on here? Why isn't anyone reviewing this? |
Preview URLs (comment last updated: 2024-07-02 05:04:30) |
Sorry, we have a lot to do here and it takes a while to get to reviews sometimes. I will take a look tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, @Mubelotix , but I don't think this is the right thing to do. "chunk" is a really fundamental concept in the Streams API, and it's assumed that people reading the reference docs for the various parts of it have that background knowledge.
Put another way: there are lots and lots of references to "chunk" throughout the Streams API reference documentation, and I don't think it makes sense to define it inline every time it is used.
We do define "chunk" in the introductory guide material for the API (https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts).
We could look at making the linkage to that more obvious? Options might include:
- add a link to https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts from https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultController/enqueue#see_also
- add a link to https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts from the sidebar for this page? I filed Show guide pages in {{APIRef}} macro yari#6229 for this a long time ago but Mozilla haven't prioritised it.
- link directly from "chunk" here to https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts ? It's a bit odd because we can't link directly to a definition of "chunk" in that page, just because of how that page is structured.
- we could additionally restructure https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts so it provides a linkable definition of "chunk", and that might be the best option, but it's quite a bit more work.
@Mubelotix Are you going to apply one of the suggestions above? |
Source: The spec https://streams.spec.whatwg.org/#model
Description
Clarify the type of chunk parameter in ReadableStreamDefaultController
Motivation
I had no idea what object I was supposed to pass