Re: [whatwg/streams] Create a dedicated section for interfacing with other specs (#1073)

@domenic commented on this pull request.



> + algorithm <dfn export for="WritableStream/create"><var>abortAlgorithm</var></dfn>, an optional
+ number <dfn export for="WritableStream/create"><var>highWaterMark</var></dfn> (default 1), an
+ optional algorithm <dfn export for="WritableStream/create"><var>sizeAlgorithm</var></dfn>, perform
+ the following steps. |writeAlgorithm| must be an algorithm that accepts a [=chunk=] object and
+ returns a promise. If given, |closeAlgorithm| and |abortAlgorithm| must return a promise. If
+ given, |sizeAlgorithm| must be an algorithm accepting [=chunk=] objects and
+ returning a number; and if given, |highWaterMark| must be a non-negative, non-NaN number.
+
+ 1. Let |startAlgorithm| be an algorithm that returns undefined.
+ 1. Let |closeAlgorithmWrapper| be an algorithm that runs these steps:
+  1. If |closeAlgorithm| was given, return the result of running it.
+  1. Return [=a promise resolved with=] undefined.
+ 1. Let |abortAlgorithmWrapper| be an algorithm that runs these steps:
+  1. If |abortAlgorithm| was given, return the result of running it.
+  1. Return [=a promise resolved with=] undefined.
+ 1. If |sizeAlgorithm| is not given, then set it to an algorithm that returns 1.

Consistency would be nicer; I'll stick with "was". It looks like this is a preexisting problem so it'll touch a few algorithms.

-- 
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/1073#discussion_r488165908

Received on Monday, 14 September 2020 19:21:12 UTC