@@ -1570,7 +1570,7 @@ To <dfn>set internal ids if needed</dfn> given |serialization internal map|,
1570
1570
[=remote end definition=] and [=local end definition=]
1571
1571
1572
1572
<pre class="cddl remote-cddl local-cddl">
1573
- RemoteValue = {
1573
+ RemoteValue = (
1574
1574
PrimitiveProtocolValue //
1575
1575
SymbolRemoteValue //
1576
1576
ArrayRemoteValue //
@@ -1589,9 +1589,11 @@ RemoteValue = {
1589
1589
PromiseRemoteValue //
1590
1590
TypedArrayRemoteValue //
1591
1591
ArrayBufferRemoteValue //
1592
+ NodeListRemoteValue //
1593
+ HTMLCollectionRemoteValue //
1592
1594
NodeRemoteValue //
1593
1595
WindowProxyRemoteValue //
1594
- }
1596
+ )
1595
1597
1596
1598
InternalId = js-uint;
1597
1599
@@ -1705,6 +1707,20 @@ ArrayBufferRemoteValue = {
1705
1707
?internalId: InternalId,
1706
1708
}
1707
1709
1710
+ NodeListRemoteValue = {
1711
+ type: "nodelist",
1712
+ ?handle: Handle,
1713
+ ?internalId: InternalId,
1714
+ ?value: ListRemoteValue,
1715
+ }
1716
+
1717
+ HTMLCollectionRemoteValue = {
1718
+ type: "htmlcollection",
1719
+ ?handle: Handle,
1720
+ ?internalId: InternalId,
1721
+ ?value: ListRemoteValue,
1722
+ }
1723
+
1708
1724
NodeRemoteValue = {
1709
1725
type: "node",
1710
1726
?handle: Handle,
@@ -1772,26 +1788,9 @@ an |ownership type|, a |serialization internal map| and a |realm|:
1772
1788
property set to |handle id| if it's not null, or omitted otherwise.
1773
1789
1774
1790
<dt> [=IsArray=] (|value|)
1775
- <dd>
1776
-
1777
- 1. Let |remote value| be a map matching the <code> ArrayRemoteValue</code>
1778
- production in the [=local end definition=] , with the <code> handle</code>
1779
- property set to |handle id| if it's not null, or omitted otherwise.
1780
-
1781
- 1. [=Set internal ids if needed=] given |serialization internal map|,
1782
- |remote value| and |value|.
1783
-
1784
- 1. Let |serialized| be null.
1785
-
1786
- 1. If |known object| is <code> false</code> , and |max depth| is not 0, run
1787
- the following steps:
1788
-
1789
- 1. Let |serialized| be the result of [=serialize as a list=] given
1790
- [=CreateArrayIterator=] (|value|, value), |max depth|, |child ownership|,
1791
- |serialization internal map| and |realm|.
1792
-
1793
- 1. If |serialized| is not null, set field <code> value</code> of |remote value| to
1794
- |serialized|.
1791
+ <dd> Let |remote value| be [=serialize an Array-like=] with
1792
+ <code> ArrayRemoteValue</code> , |handle id|, |value|, |max depth|,
1793
+ |ownership type|, |known object|, |serialization internal map|, and |realm|.
1795
1794
1796
1795
<dt> [=IsRegExp=] (|value|)
1797
1796
<dd>
@@ -1894,6 +1893,17 @@ an |ownership type|, a |serialization internal map| and a |realm|:
1894
1893
production in the [=local end definition=] , with the <code> handle</code>
1895
1894
property set to |handle id| if it's not null, or omitted otherwise.
1896
1895
1896
+ <dt> |value| is a [=platform object=] that implements {{NodeList}}
1897
+ <dd> Let |remote value| be [=serialize an Array-like=] with
1898
+ <code> NodeListRemoteValue</code> ,|handle id|, |value|, |max depth|,
1899
+ |ownership type|, |known object|, |serialization internal map|, and |realm|.
1900
+
1901
+ <dt> |value| is a [=platform object=] that implements {{HTMLCollection}}
1902
+ <dd> Let |remote value| be [=serialize an Array-like=] with
1903
+ <code> HTMLCollectionRemoteValue</code> , |value|, |handle id|, |value|, |max
1904
+ depth|, |ownership type|, |known object|, |serialization internal map|, and
1905
+ |realm|.
1906
+
1897
1907
<dt> |value| is a [=platform object=] that implements [=Node=]
1898
1908
<dd>
1899
1909
1. Let |remote value| be a map matching the <code> NodeRemoteValue</code>
@@ -2032,6 +2042,30 @@ remove optional flag from the field.
2032
2042
2033
2043
</div>
2034
2044
2045
+ <div algorithm>
2046
+ To <dfn>serialize an Array-like</dfn> given |production|, |handle id|, |value|,
2047
+ |max depth|, |ownership type|, |known object|, |serialization internal map|, and |realm|:
2048
+
2049
+ 1. Let |remote value| be a map matching |production|, with the
2050
+ <code> handle</code> property set to |handle id| if it's not null, or omitted
2051
+ otherwise.
2052
+
2053
+ 1. [=Set internal ids if needed=] given |serialization internal map|,
2054
+ |remote value| and |value|.
2055
+
2056
+ 1. If |known object| is <code> false</code> , and |max depth| is not 0:
2057
+
2058
+ 1. Let |serialized| be the result of [=serialize as a list=] given
2059
+ [=CreateArrayIterator=] (|value|, value), |max depth|, |ownership type|,
2060
+ |serialization internal map| and |realm|.
2061
+
2062
+ 1. If |serialized| is not null, set field <code> value</code> of |remote value| to
2063
+ |serialized|.
2064
+
2065
+ 1. Return |remote value|
2066
+
2067
+ </div>
2068
+
2035
2069
<div algorithm>
2036
2070
To <dfn>serialize as a list</dfn> given |iterable|, |max depth|, |ownership type|,
2037
2071
|serialization internal map| and |realm|:
0 commit comments