Skip to content

Commit 4c38a27

Browse files
authored
Use Event production in 'emit an event' assertion (#903)
The `emit an event` algorithm previously asserted that the event body only contains `method` and `params`, which is no longer the case after #484 added the `type` field. Instead of such low-level assertion, this commit changes the assertion to match against the Event type production.
1 parent aaec7b6 commit 4c38a27

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.bs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,8 +1215,7 @@ To <dfn>get valid top-level traversables by ids</dfn> given a [=/list=] of conte
12151215

12161216
<div algorithm> To <dfn export>emit an event</dfn> given |session|, and |body|:
12171217

1218-
1. [=Assert=]: |body| has [=map/size=] 2 and [=map/contains=] "<code>method</code>"
1219-
and "<code>params</code>".
1218+
1. [=Assert=]: |body| matches the <code>Event</code> production.
12201219

12211220
1. Let |serialized| be the result of [=serialize an infra value to JSON
12221221
bytes=] given |body|.

0 commit comments

Comments
 (0)