Browse the docs

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 #

ParameterTypeRequiredValuesWhat it does
nametextYesThe event name. Required.
browserone ofsafari chrome front
dataany valueAny JSON.
tabany valueWhich tab.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Show a badge on the PR page
Do
  1. Put JavaScript in the page
  2. Send “status” to the page
Open in Switchboard to try it

Gotchas #

  • A page with no listener drops the message.