diff --git a/index.bs b/index.bs index 2bf755f9..380e8492 100644 --- a/index.bs +++ b/index.bs @@ -1643,8 +1643,8 @@ session.SystemProxyConfiguration = (
 session.SubscriptionRequest = {
-  events: [*text],
-  ? contexts: [*browsingContext.BrowsingContext],
+  events: [+text],
+  ? contexts: [+browsingContext.BrowsingContext],
 }
 
@@ -1832,8 +1832,8 @@ Issue: This needs to be generalized to work with realms too
       session.Subscribe = (
-        method: "session.subscribe",
-        params: session.SubscriptionRequest
+         method: "session.subscribe",
+         params: session.SubscriptionRequest
       )
       
@@ -1848,14 +1848,22 @@ Issue: This needs to be generalized to work with realms too
The [=remote end steps=] with |session| and |command parameters| are: -1. Let the |list of event names| be the value of the events field of - |command parameters| +1. Let the |set of event names| be empty [=set=]. -1. Let the |list of contexts| be the value of the contexts - field of |command parameters| if it is present or null if it isn't. + 1. For each |event| of command parameters["events"]: + + 1. Append |event| to |set of event names|. + +1. Let |set of contexts| be null. + +1. If the value of the contexts field of |command parameters| is not null: + + 1. Set |set of contexts| to empty [=set=]. + + 1. For each |event| of command parameters["contexts"], append |event| to |set of contexts|. 1. Let |enabled events| be the result of [=trying=] to [=update the event map=] - with |session|, |list of event names| , |list of contexts| and + with |session|, |set of event names| , |set of contexts| and enabled true. 1. Let |subscribe step events| be a new [=/map=]. @@ -1898,12 +1906,12 @@ Issue: This needs to be generalised to work with realms too
Command Type
-
-     session.Unsubscribe = (
-       method: "session.unsubscribe",
-       params: session.SubscriptionRequest
-     )
-     
+
+      session.Unsubscribe = (
+         method: "session.unsubscribe",
+         params: session.SubscriptionRequest
+      )
+      
Result Type
@@ -1916,14 +1924,22 @@ Issue: This needs to be generalised to work with realms too
The [=remote end steps=] with |session| and |command parameters| are: -1. Let the |list of event names| be the value of the events field of - |command parameters|. +1. Let the |set of event names| be empty [=set=]. + + 1. For each |event| of command parameters["events"], append |event| to |set of event names|. + +1. Let |set of contexts| be null. + +1. If the value of the contexts field of |command parameters| is not null: + + 1. Set |set of contexts| to empty [=set=]. + + 1. For each |event| of command parameters["contexts"]: -1. Let the |list of contexts| be the value of the contexts - field of |command parameters| if it is present or null if it isn't. + 1. Append |event| to |set of contexts|. 1. [=Try=] to [=update the event map=] with |session|, - |list of event names|, |list of contexts| and enabled false. + |set of event names|, |set of contexts| and enabled false. 1. Return [=success=] with data null.