-
Notifications
You must be signed in to change notification settings - Fork 224
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
Update WebSocket.binaryType description with the new behavior #1690
Conversation
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.
Left just a few small comments, overall it looks good!
docs/sources/next/javascript-api/k6-experimental/websockets/_index.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/websockets/blob/_index.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/websockets/blob/_index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Heitor Tashiro Sergent <[email protected]>
| Blob.arrayBuffer() | Returns a `Promise` that resolves with the contents of the blob as binary data contained in an `ArrayBuffer`. | | ||
| Blob.bytes() | Returns a `Promise` that resolves with a `Uint8Array` containing the contents of the blob as an array of bytes. | | ||
| Blob.slice() | Returns a new `Blob` object which contains data from a subset of the blob on which it's called. | | ||
| Blob.stream() | Returns a [ReadableStream](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/streams/readablestream) which upon reading returns the data contained within the `Blob`. | | ||
| Blob.text() | Returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as `UTF-8`. | |
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.
Do you (@mstoykov) think we need specific pages for these methods, as we have for WebSocket methods? 🤔
I'm wondering whether specific examples of each method are really useful. Maybe just slice()
which is the only one that can have multiple variants? Or just point to the MDN Web Docs?
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.
I think that we can do that in a future iteration. Maybe when Blob isn't in this module but globally available.
…ndex.md Co-authored-by: Heitor Tashiro Sergent <[email protected]>
What?
It updates the description of
WebSocket.binaryType
according to the recent changes.Checklist
npm start
command locally and verified that the changes look good.docs/sources/next
folder of the documentation.docs/sources/v{most_recent_release}
folder of the documentation.docs/sources/next
folder of the documentation.Related PR(s)/Issue(s)