Re: [whatwg/streams] Export "set up reader/writer" algorithms for other specs (PR #1370)

@MattiasBuelens commented on this pull request.



> @@ -7133,6 +7133,16 @@ failures should be handled by the calling specification.
  <p class="note">This will throw an exception if |stream| is already [=ReadableStream/locked=].
 </div>
 
+<div algorithm>
+ <p>To <dfn export for="ReadableStreamDefaultReader">set up</dfn> a newly-[=new|created-via-Web IDL=]

This is following the format for e.g. [set up a `ReadableStream`](https://streams.spec.whatwg.org/#readablestream-set-up). The intention is that you created this object without running the [`new ReadableStreamDefaultReader()` constructor](https://streams.spec.whatwg.org/#default-reader-constructor).

This is needed because (if I understand correctly) the IDL machinery does not automatically call the "super constructor" when you define a constructor for a subclass. If we're wrong about that, then we may want to revise all of our "set up" algorithms. 😅

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1370?email_source=notifications&email_token=ACLYVMM2PA6VY6XMNAIYCB34W7M7NA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMJVGA3DQMZXGIYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS6XA4S7OJSXM2LFO5PW433UNFTGSY3BORUW63TTL5RWY2LDNM#discussion_r3120219594
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/pull/1370/review/4150683720@github.com>

Received on Tuesday, 21 April 2026 20:47:54 UTC