Skip to content

Commit 38f415f

Browse files
committed
Add StructuredSerializeOptions enqueue variant
1 parent d39cc7f commit 38f415f

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

index.bs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,8 @@ interface ReadableStreamDefaultController {
14701470
readonly attribute unrestricted double? desiredSize;
14711471

14721472
undefined close();
1473-
undefined enqueue(optional any chunk, optional sequence<object> transfer = []);
1473+
undefined enqueue(any chunk, sequence<object> transfer);
1474+
undefined enqueue(optional any chunk, optional StructuredSerializeOptions options = { });
14741475
undefined error(optional any e);
14751476
};
14761477
</xmp>
@@ -1580,12 +1581,23 @@ the following table:
15801581
</div>
15811582

15821583
<div algorithm>
1583-
The <dfn id="rs-default-controller-enqueue" method
1584-
for="ReadableStreamDefaultController">enqueue(|chunk|, |transferList|)</dfn> method steps are:
1584+
The <dfn id="ref-for-rs-default-controller-enqueue" method
1585+
for="ReadableStreamDefaultController">enqueue(|chunk|, |transfer|)</dfn> method steps are:
15851586

15861587
1. If ! [$ReadableStreamDefaultControllerCanCloseOrEnqueue$]([=this=]) is false, throw a
15871588
{{TypeError}} exception.
1588-
1. Perform ? [$ReadableStreamDefaultControllerEnqueue$]([=this=], |chunk|, |transferList|).
1589+
1. Perform ? [$ReadableStreamDefaultControllerEnqueue$]([=this=], |chunk|, |transfer|).
1590+
</div>
1591+
1592+
1593+
<div algorithm>
1594+
The <dfn id="ref-for-rs-default-controller-enqueue②" method
1595+
for="ReadableStreamDefaultController">enqueue(|chunk|, |options|)</dfn> method steps are:
1596+
1597+
1. Let |transfer| be |options|["transfer"].
1598+
1. If ! [$ReadableStreamDefaultControllerCanCloseOrEnqueue$]([=this=]) is false, throw a
1599+
{{TypeError}} exception.
1600+
1. Perform ? [$ReadableStreamDefaultControllerEnqueue$]([=this=], |chunk|, |transfer|).
15891601
</div>
15901602

15911603
<div algorithm>

0 commit comments

Comments
 (0)