Skip to content

Commit fbccf28

Browse files
posvaCopilot
andauthored
Update InPageChannelProtocol description for clarity [skip ci]
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 206ac8e commit fbccf28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/content/8.references/5.browser-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The values of `rpc.status`: [Handling connection and auth errors](/guide/client#
5050

5151
The browser-only endpoint methods of the [in-page channel](/guide/in-page-channel). `emit()` sends to the opposite endpoint; `on()` handles events arriving from that endpoint.
5252

53-
`InPageChannelProtocol` separates `functions` and `events`. Each section has optional `pageScript` and `panel` maps naming the receiving direction. Endpoint options require a complete `functions` map with handlers and a complete `events` map with optional handlers; use `{}` for empty maps. `call()` uses function names regardless of return type, while `emit()`, `callEvent()` (deprecated), and `on()` use event names. A function returning `void` or `Promise<void>` remains an awaitable request/response call.
53+
`InPageChannelProtocol` separates `functions` and `events`. Each section has optional `pageScript` and `panel` maps naming the receiving direction. Endpoint options require a complete `functions` map with handlers; `events` is optional, and when provided can include optional handlers (use `{}` to declare an event without a handler for `channel.on()`). `call()` uses function names regardless of return type, while `emit()`, `callEvent()` (deprecated), and `on()` use event names. A function returning `void` or `Promise<void>` remains an awaitable request/response call.
5454

5555
| Method or property | Page-script endpoint | Panel endpoint |
5656
|--------------------|-------------|-------|

0 commit comments

Comments
 (0)