-
Notifications
You must be signed in to change notification settings - Fork 2.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
WritableStream Example #532
base: gh-pages
Are you sure you want to change the base?
Conversation
I actually do need a review because I need code examples for MDN. I tried to add Jake as the reviewer, but he isn't in the assignees list for some reason. |
@jakearchibald Do you mind having a look at this sample? |
c198a70
to
03c4155
Compare
1de1b35
to
c4f3954
Compare
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.
LGTM, if I don't hear from you I'll merge with suggestions applied.
let buffer = new ArrayBuffer(2); | ||
let view = new Uint16Array(buffer); | ||
view[0] = chunk; | ||
let decoded = decoder.decode(view, {stream: true}); |
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.
Can these variables be const?
@@ -0,0 +1,8 @@ | |||
<!-- TODO: Replace PLACEHOLDER with feature name. --> |
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.
Can you remove these TODOs?
<!-- TODO: Replace PLACEHOLDER with feature name. --> |
<!-- TODO: Replace PLACEHOLDER with feature name. --> | ||
Stream Samples | ||
=== | ||
<!-- TODO: Replace PLACEHOLDER in the path to correspond to the real github.io URL. --> |
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.
<!-- TODO: Replace PLACEHOLDER in the path to correspond to the real github.io URL. --> |
<!-- TODO: Replace PLACEHOLDER in the path to correspond to the real github.io URL. --> | ||
See https://googlechrome.github.io/samples/streams/index.html for a live demo. | ||
|
||
<!-- TODO: Replace PLACEHOLDER with the id from the chromestatus.com URL. --> |
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.
<!-- TODO: Replace PLACEHOLDER with the id from the chromestatus.com URL. --> |
let buffer = new ArrayBuffer(2); | ||
let view = new Uint16Array(buffer); | ||
view[0] = chunk; | ||
let decoded = decoder.decode(view, {stream: true}); |
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.
let buffer = new ArrayBuffer(2); | |
let view = new Uint16Array(buffer); | |
view[0] = chunk; | |
let decoded = decoder.decode(view, {stream: true}); | |
const buffer = new ArrayBuffer(2); | |
const view = new Uint16Array(buffer); | |
view[0] = chunk; | |
const decoded = decoder.decode(view, {stream: true}); |
I don't know if this is good enough for our samples, I'm going to try. At least I'll learn better coding.