- From: Gus Caplan <notifications@github.com>
- Date: Thu, 30 Aug 2018 09:53:43 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 30 August 2018 16:54:16 UTC
devsnek commented on this pull request.
> @@ -1402,6 +1405,90 @@ lt="ReadableStreamDefaultReader(stream)">new ReadableStreamDefaultReader(<var>st
1. Perform ! ReadableStreamReaderGenericRelease(*this*).
</emu-alg>
+<h5 id="default-reader-getiterator" method for="ReadableStreamDefaultReader">getIterator({ preventCancel = false } = {})
+</h5>
+
+<p class="note">
+ The <code>getIterator</code> method returns an async iterator which can be used to consume the stream. The
+ {{ReadableStreamDefaultReaderAsyncIteratorPrototype/return()}} method of this iterator object will optionally
+ {{ReadableStreamDefaultReader/cancel()}} this reader.
+</p>
+
+<emu-alg>
+ 1. If ! IsReadableStreamDefaultReader(*this*) is *false*, throw a *TypeError* exception.
+ 1. If *this*.[[ownerReadableStream]] is *undefined*, throw a *TypeError* exception.
+ 1. Let _iterator_ be ObjectCreate(`<a idl>ReadableStreamDefaultReaderAsyncIteratorPrototype</a>`, « [[Reader]],
we don't use ! anywhere else.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/950#discussion_r214104860
Received on Thursday, 30 August 2018 16:54:16 UTC