1. Optionally, return.
Note: This step allows for an [=implementation-defined=] security check, to sandbox what information to expose.
2. Let |params| be a [=map=] matching the `InteractionCapturedOutputParameters` production with the `data` field set to |data|.
3. Let |body| be a [=map=] matching the `InteractionCapturedOutputEvent` production with the `params` field set to |params|.
4. [=Emit an event=] with |session| and |body|.
The "interaction.capturedOutput" event references an undefined variable named "session":
This proposal borrows many concepts from the WebDriver BiDi editor's draft, including the concept of emitting an event "given a session and body." However, this proposal doesn't have WebDriver BiDi's "event map" abstraction which is crucial for the emission of events in that document.