Skip to content

Commit 8368fd8

Browse files
committed
fix
1 parent da646b8 commit 8368fd8

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

index.bs

+7-12
Original file line numberDiff line numberDiff line change
@@ -4276,11 +4276,11 @@ as seen for example in [[#example-ws-no-backpressure]].
42764276
<p>Writes a [=chunk=] of data to the stream just like the {{WritableStreamDefaultWriter/write()}}
42774277
method.
42784278

4279-
<p>This is a convenience method that first acquires a writer, then writes the chunk, and releases
4280-
the writer (regardless of the outcome of the write). The returned promise will fulfill if the
4281-
write was successful, or reject if the write failed. Additionally, it will reject with a
4282-
{{TypeError}} if the stream is currently [=locked to a writer|locked=] (without attempting to
4283-
write).
4279+
<p>This is a convenience method that first acquires a writer, queues the chunk to be written,
4280+
releases the writer (without waiting on the write to complete), and returns a promise that
4281+
fulfills if the write was successful, or reject if the write failed. Additionally, if the stream
4282+
is currently [=locked to a writer|locked=], a promise rejecting with a {{TypeError}} is returned,
4283+
and no attempt to write will be made.
42844284

42854285
<dt><code>await <var ignore>stream</var>.{{WritableStream/abort(reason)|abort}}([ <var ignore>reason</var> ])</code>
42864286
<dd>
@@ -4351,13 +4351,8 @@ as seen for example in [[#example-ws-no-backpressure]].
43514351
1. If |result| is an abrupt completion, return [=a promise rejected with=] |result|.\[[Value]].
43524352
1. Let |writer| be |result|.\[[Value]].
43534353
1. Let |writePromise| be ! [$WritableStreamDefaultWriterWrite$](|writer|, |chunk|).
4354-
1. Return the result of [=reacting=] to |writePromise|:
4355-
1. If |writePromise| is fulfilled with a value |v|, then:
4356-
1. Perform ! [$WritableStreamDefaultWriterRelease$](|writer|).
4357-
1. Return |v|.
4358-
1. If |writePromise| is rejected with a value |r|, then:
4359-
1. Perform ! [$WritableStreamDefaultWriterRelease$](|writer|).
4360-
1. Return [=a promise rejected with=] |r|.
4354+
1. Perform ! [$WritableStreamDefaultWriterRelease$](|writer|).
4355+
1. Return |writePromise|.
43614356
</div>
43624357

43634358
<div algorithm>

0 commit comments

Comments
 (0)