Skip to content

Commit 0ff6d45

Browse files
committed
Add a wrapper for other specs to error WritableStreams
Needed for w3c/webtransport#248.
1 parent 316530a commit 0ff6d45

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.bs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6280,7 +6280,7 @@ for="ReadableStream">locked</dfn> if ! [$IsReadableStreamLocked$](|stream|) retu
62806280

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

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

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

6323+
The following algorithm must only be used on {{WritableStream}} instances initialized via the above
6324+
[=WritableStream/set up=] algorithm:
6325+
6326+
<p algorithm>To <dfn export for="WritableStream" lt="error|erroring">error</dfn> a
6327+
{{WritableStream}} |stream| given a JavaScript value |e|, perform !
6328+
[$WritableStreamDefaultControllerErrorIfNeeded$](|stream|.[=WritableStream/[[controller]]=], |e|).
6329+
63236330
<h4 id="other-specs-ws-writing">Writing</h4>
63246331

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

0 commit comments

Comments
 (0)