- From: Domenic Denicola <notifications@github.com>
- Date: Thu, 11 Jun 2015 13:58:15 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Thursday, 11 June 2015 20:58:42 UTC
> + return CancelReadableByteStream(this._ownerReadableByteStream, reason); > + } > + > + read(view) { > + if (!IsReadableByteStreamByobReader(this)) { > + return Promise.reject( > + new TypeError( > + 'ReadableByteStreamByobReader.prototype.read can only be used on a ReadableByteStreamByobReader')); > + } > + > + if (view === undefined) { > + return Promise.reject(new TypeError('Valid view must be provided')); > + } > + > + const ctor = view.constructor; > + let elementSize = 1; Can't we use `ctor.BYTES_PER_ELEMENT`? In spec-speak it looks like https://people.mozilla.org/~jorendorff/es6-draft.html#sec-typedarray.bytes_per_element --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/361/files#r32267377
Received on Thursday, 11 June 2015 20:58:42 UTC