Skip to content

Commit

Permalink
Add a wrapper for other specs to error WritableStreams
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed May 13, 2021
1 parent 316530a commit 0ff6d45
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6280,7 +6280,7 @@ for="ReadableStream">locked</dfn> if ! [$IsReadableStreamLocked$](|stream|) retu

<h3 id="other-specs-ws">Writable streams</h3>

<h4 id="other-specs-ws-creation">Creation</h4>
<h4 id="other-specs-ws-creation">Creation and manipulation</h4>

<div algorithm="set up a WritableStream">
To <dfn export for="WritableStream">set up</dfn> a newly-[=new|created-via-Web IDL=]
Expand Down Expand Up @@ -6320,6 +6320,13 @@ for="ReadableStream">locked</dfn> if ! [$IsReadableStreamLocked$](|stream|) retu
directly on the [=this=] value inside their constructor steps.</p>
</div>

The following algorithm must only be used on {{WritableStream}} instances initialized via the above
[=WritableStream/set up=] algorithm:

<p algorithm>To <dfn export for="WritableStream" lt="error|erroring">error</dfn> a
{{WritableStream}} |stream| given a JavaScript value |e|, perform !
[$WritableStreamDefaultControllerErrorIfNeeded$](|stream|.[=WritableStream/[[controller]]=], |e|).

<h4 id="other-specs-ws-writing">Writing</h4>

The following algorithms can be used on arbitrary {{WritableStream}} instances, including ones that
Expand Down

0 comments on commit 0ff6d45

Please sign in to comment.