Send data to the page
Pushes data to the page's switchboard.on listeners, live.
Send name to the page
Details #
Delivers data to code in the tab that listens with switchboard.on("name", fn). Only code Switchboard injected can listen. tab can be a match with all to reach several tabs.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
name | text | Yes | The event name. Required. | |
browser | one of | safari chrome front | ||
data | any value | Any JSON. | ||
tab | any value | Which tab. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
Show a badge on the PR page
Do
- Put JavaScript in the page
- Send “status” to the page
Gotchas #
A page with no listener drops the message.