@@ -1643,8 +1643,8 @@ session.SystemProxyConfiguration = (
1643
1643
1644
1644
<pre class="cddl remote-cddl">
1645
1645
session.SubscriptionRequest = {
1646
- events: [* text] ,
1647
- ? contexts: [* browsingContext.BrowsingContext] ,
1646
+ events: [+ text] ,
1647
+ ? contexts: [+ browsingContext.BrowsingContext] ,
1648
1648
}
1649
1649
</pre>
1650
1650
@@ -1832,8 +1832,8 @@ Issue: This needs to be generalized to work with realms too
1832
1832
<dd>
1833
1833
<pre class="cddl remote-cddl">
1834
1834
session.Subscribe = (
1835
- method: "session.subscribe",
1836
- params: session.SubscriptionRequest
1835
+ method: "session.subscribe",
1836
+ params: session.SubscriptionRequest
1837
1837
)
1838
1838
</pre>
1839
1839
</dd>
@@ -1848,14 +1848,20 @@ Issue: This needs to be generalized to work with realms too
1848
1848
<div algorithm="remote end steps for session.subscribe">
1849
1849
The [=remote end steps=] with |session| and |command parameters| are:
1850
1850
1851
- 1. Let the |list of event names| be the value of the <code> events</code> field of
1852
- |command parameters|
1851
+ 1. Let the |set of event names| be empty [=set=] .
1853
1852
1854
- 1. Let the |list of contexts| be the value of the <code> contexts</code>
1855
- field of |command parameters| if it is present or null if it isn't.
1853
+ 1. For each |event| of <code> command parameters</code> ["events"] , append |event| to |set of event names|.
1854
+
1855
+ 1. Let |set of contexts| be null.
1856
+
1857
+ 1. If the value of the <code> contexts</code> field of |command parameters| is not null.
1858
+
1859
+ 1. Set |set of contexts| to empty [=set=] .
1860
+
1861
+ 1. For each |event| of <code> command parameters</code> ["contexts"] , append |event| to |set of contexts|.
1856
1862
1857
1863
1. Let |enabled events| be the result of [=trying=] to [=update the event map=]
1858
- with |session|, |list of event names| , |list of contexts| and
1864
+ with |session|, |set of event names| , |set of contexts| and
1859
1865
enabled true.
1860
1866
1861
1867
1. Let |subscribe step events| be a new [=/map=] .
@@ -1898,12 +1904,12 @@ Issue: This needs to be generalised to work with realms too
1898
1904
<dl>
1899
1905
<dt> Command Type</dt>
1900
1906
<dd>
1901
- <pre class="cddl remote-cddl">
1902
- session.Unsubscribe = (
1903
- method: "session.unsubscribe",
1904
- params: session.SubscriptionRequest
1905
- )
1906
- </pre>
1907
+ <pre class="cddl remote-cddl">
1908
+ session.Unsubscribe = (
1909
+ method: "session.unsubscribe",
1910
+ params: session.SubscriptionRequest
1911
+ )
1912
+ </pre>
1907
1913
</dd>
1908
1914
<dt> Result Type</dt>
1909
1915
<dd>
@@ -1916,14 +1922,20 @@ Issue: This needs to be generalised to work with realms too
1916
1922
<div algorithm="remote end steps for session.unsubscribe">
1917
1923
The [=remote end steps=] with |session| and |command parameters| are:
1918
1924
1919
- 1. Let the |list of event names| be the value of the <code> events</code> field of
1920
- |command parameters|.
1925
+ 1. Let the |set of event names| be empty [=set=] .
1926
+
1927
+ 1. For each |event| of <code> command parameters</code> ["events"] , append |event| to |set of event names|.
1928
+
1929
+ 1. Let |set of contexts| be null.
1930
+
1931
+ 1. If the value of the <code> contexts</code> field of |command parameters| is not null.
1932
+
1933
+ 1. Set |set of contexts| to empty [=set=] .
1921
1934
1922
- 1. Let the |list of contexts| be the value of the <code> contexts</code>
1923
- field of |command parameters| if it is present or null if it isn't.
1935
+ 1. For each |event| of <code> command parameters</code> ["contexts"] , append |event| to |set of contexts|.
1924
1936
1925
1937
1. [=Try=] to [=update the event map=] with |session|,
1926
- |list of event names|, |list of contexts| and enabled false.
1938
+ |set of event names|, |list of contexts| and enabled false.
1927
1939
1928
1940
1. Return [=success=] with data null.
1929
1941
0 commit comments