@@ -789,6 +789,29 @@ given |event name| and |session| is:
789
789
790
790
</div>
791
791
792
+ <div algorithm>
793
+ To <dfn>obtain a set of event names</dfn> given a |name|:
794
+
795
+ 1. Let |events| be an empty [=/set=] .
796
+
797
+ 1. If |name| contains a U+002E (period):
798
+
799
+ 1. If |name| is the [=event name=] for an event, append |name| to |events|
800
+ and return [=success=] with data |events|.
801
+
802
+ 1. Return an [=error=] with [=error code=] [=invalid argument=]
803
+
804
+ 1. Otherwise |name| is interpreted as representing all the events in a
805
+ module. If |name| is not a [=module name=] return an [=error=] with
806
+ [=error code=] [=invalid argument=] .
807
+
808
+ 1. Append the [=event name=] for each [=event=] in the module with name |name| to
809
+ |events|.
810
+
811
+ 1. Return [=success=] with data |events|.
812
+
813
+ </div>
814
+
792
815
# Transport # {#transport}
793
816
794
817
Message transport is provided using the WebSocket protocol.
@@ -1897,7 +1920,11 @@ Issue: This needs to be generalized to work with realms too.
1897
1920
<div algorithm="remote end steps for session.subscribe">
1898
1921
The [=remote end steps=] with |session| and |command parameters| are:
1899
1922
1900
- 1. Let the |event names| be [=set/create|create a set=] with |command parameters|["<code>events</code>"] .
1923
+ 1. Let |event names| be an empty [=/set=] .
1924
+
1925
+ 1. For each entry |name| in |command parameters|["<code>events</code>"] ,
1926
+ let |event names| be the [=set/union=] of |event names| and the result of
1927
+ [=trying=] to [=obtain a set of event names=] with |name|.
1901
1928
1902
1929
1. Let |subscription navigables| be a [=/set=] .
1903
1930
@@ -2001,7 +2028,11 @@ The [=remote end steps=] with |session| and |command parameters| are:
2001
2028
2002
2029
1. If |command parameters| matches the <code> session.UnsubscribeByAttributesRequest</code> production:
2003
2030
2004
- 1. Let |event names| be [=set/create|create a set=] with |command parameters|["<code>events</code>"] .
2031
+ 1. Let |event names| be an empty [=/set=] .
2032
+
2033
+ 1. For each entry |name| in |command parameters|["<code>events</code>"] ,
2034
+ let |event names| be the [=set/union=] of |event names| and the result of
2035
+ [=trying=] to [=obtain a set of event names=] with |name|.
2005
2036
2006
2037
1. Let |top-level traversable context ids| be a [=/set=] .
2007
2038
0 commit comments