Skip to content

Commit 5136b19

Browse files
authored
Editorial: correct handling of session connections (#345)
This proposal defines the term "WebSocket connection" to describe a type. It defines the term "session WebSocket connections" as a property of the "session" primitive. Prior to this commit, the proposal twice referred to the type as though it were a property of a session. Correct the references to the session property.
1 parent 0e26c0a commit 5136b19

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

index.bs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -862,9 +862,10 @@ To <dfn>handle an incoming message</dfn> given a [=WebSocket connection=]
862862

863863
1. If |method| is "<code>session.new</code>", let |session| be the entry in
864864
the list of [=active sessions=] whose [=session ID=] is equal to the
865-
"<code>sessionId</code>" property of |value|, let |session|'s
866-
[=WebSocket connection=] be |connection|, and remove |connection| from
867-
[=WebSocket connections not associated with a session=].
865+
"<code>sessionId</code>" property of |value|, [=set/append=]
866+
|connection| to |session|'s [=session WebSocket connections=], and
867+
remove |connection| from the [=WebSocket connections not associated with
868+
a session=].
868869

869870
1. Let |response| be a new [=/map=] matching the <code>CommandResponse</code>
870871
production in the [=local end definition=] with the <code>id</code>
@@ -920,14 +921,12 @@ To <dfn>get related browsing contexts</dfn> given an [=script/settings object=]
920921
1. [=Assert=]: |body| has [=map/size=] 2 and [=map/contains=] "<code>method</code>"
921922
and "<code>params</code>".
922923

923-
1. Let |connection| be |session|'s [=WebSocket connection=].
924-
925-
1. If |connection| is null, return.
926-
927924
1. Let |serialized| be the result of [=serialize an infra value to JSON
928925
bytes=] given |body|.
929926

930-
1. [=Send a WebSocket message=] comprised of |serialized| over |connection|.
927+
1. [=list/For each=] |connection| in |session|'s [=session WebSocket connections=]:
928+
929+
1. [=Send a WebSocket message=] comprised of |serialized| over |connection|.
931930

932931
</div>
933932

0 commit comments

Comments
 (0)