@@ -1506,8 +1506,8 @@ session.SystemProxyConfiguration = (
1506
1506
1507
1507
<pre class="cddl remote-cddl">
1508
1508
session.SubscriptionRequest = {
1509
- events: [* text] ,
1510
- ? contexts: [* browsingContext.BrowsingContext] ,
1509
+ events: [+ text] ,
1510
+ ? contexts: [+ browsingContext.BrowsingContext] ,
1511
1511
}
1512
1512
</pre>
1513
1513
@@ -1695,8 +1695,8 @@ Issue: This needs to be generalized to work with realms too
1695
1695
<dd>
1696
1696
<pre class="cddl remote-cddl">
1697
1697
session.Subscribe = (
1698
- method: "session.subscribe",
1699
- params: session.SubscriptionRequest
1698
+ method: "session.subscribe",
1699
+ params: session.SubscriptionRequest
1700
1700
)
1701
1701
</pre>
1702
1702
</dd>
@@ -1711,14 +1711,20 @@ Issue: This needs to be generalized to work with realms too
1711
1711
<div algorithm="remote end steps for session.subscribe">
1712
1712
The [=remote end steps=] with |session| and |command parameters| are:
1713
1713
1714
- 1. Let the |list of event names| be the value of the <code> events</code> field of
1715
- |command parameters|
1714
+ 1. Let the |set of event names| be empty [=set=] .
1716
1715
1717
- 1. Let the |list of contexts| be the value of the <code> contexts</code>
1718
- field of |command parameters| if it is present or null if it isn't.
1716
+ 1. For each |event| of <code> command parameters</code> ["events"] , append |event| to |set of event names|.
1717
+
1718
+ 1. Let |set of contexts| be null.
1719
+
1720
+ 1. If the value of the <code> contexts</code> field of |command parameters| is not null.
1721
+
1722
+ 1. Set |set of contexts| to empty [=set=] .
1723
+
1724
+ 1. For each |event| of <code> command parameters</code> ["contexts"] , append |event| to |set of contexts|.
1719
1725
1720
1726
1. Let |enabled events| be the result of [=trying=] to [=update the event map=]
1721
- with |session|, |list of event names| , |list of contexts| and
1727
+ with |session|, |set of event names| , |set of contexts| and
1722
1728
enabled true.
1723
1729
1724
1730
1. Let |subscribe step events| be a new [=/map=] .
@@ -1761,12 +1767,12 @@ Issue: This needs to be generalised to work with realms too
1761
1767
<dl>
1762
1768
<dt> Command Type</dt>
1763
1769
<dd>
1764
- <pre class="cddl remote-cddl">
1765
- session.Unsubscribe = (
1766
- method: "session.unsubscribe",
1767
- params: session.SubscriptionRequest
1768
- )
1769
- </pre>
1770
+ <pre class="cddl remote-cddl">
1771
+ session.Unsubscribe = (
1772
+ method: "session.unsubscribe",
1773
+ params: session.SubscriptionRequest
1774
+ )
1775
+ </pre>
1770
1776
</dd>
1771
1777
<dt> Result Type</dt>
1772
1778
<dd>
@@ -1779,14 +1785,20 @@ Issue: This needs to be generalised to work with realms too
1779
1785
<div algorithm="remote end steps for session.unsubscribe">
1780
1786
The [=remote end steps=] with |session| and |command parameters| are:
1781
1787
1782
- 1. Let the |list of event names| be the value of the <code> events</code> field of
1783
- |command parameters|.
1788
+ 1. Let the |set of event names| be empty [=set=] .
1789
+
1790
+ 1. For each |event| of <code> command parameters</code> ["events"] , append |event| to |set of event names|.
1791
+
1792
+ 1. Let |set of contexts| be null.
1793
+
1794
+ 1. If the value of the <code> contexts</code> field of |command parameters| is not null.
1795
+
1796
+ 1. Set |set of contexts| to empty [=set=] .
1784
1797
1785
- 1. Let the |list of contexts| be the value of the <code> contexts</code>
1786
- field of |command parameters| if it is present or null if it isn't.
1798
+ 1. For each |event| of <code> command parameters</code> ["contexts"] , append |event| to |set of contexts|.
1787
1799
1788
1800
1. [=Try=] to [=update the event map=] with |session|,
1789
- |list of event names|, |list of contexts| and enabled false.
1801
+ |set of event names|, |list of contexts| and enabled false.
1790
1802
1791
1803
1. Return [=success=] with data null.
1792
1804
0 commit comments