Skip to content

Send message to other addon

Robbendebiene edited this page Dec 5, 2018 · 8 revisions

Send message to other add-on

This is an advanced command that enables you to send messages to other add-ons, which then can be used to run other add-ons functionality, if the add-on supports it.

Examples:

  • The following configuration will open the "Manage Groups" page of Simple Tab Groups.
    Add-on ID: simple-tab-groups@drive4ik
    Message: { "action": "open-manage-groups" }
    Parse message: On

  • The following configuration will focus the next sibling tab without expanding its children in Tree Style Tab. Visit the Tree Style Tab API for more information.
    Add-on ID: [email protected]
    Message: { "type": "focus", "tab": "nextSibling", "silently": true }
    Parse message: On

  • The following configuration will open a new temporary container from the Temporary Containers add-on.
    Add-on ID: {c607c8df-14a7-4f28-894f-29e8722976af}
    Message: { "method": "createTabInTempContainer" }
    Parse message: On

How to find out the Addon ID

There are several ways to find out the ID of an Add-on. Opening about:debugging by typing it into the URL bar will display a list of your installed add-ons with their corresponding ID. Ensure that you take the extensions ID (highlighted with green in the screenshot) and not the internal UUID.

Error: Not serializeable

This means that the specified message string cannot be converted into a JavaScript object due to an incorrect syntax. To find the cause of the syntax error more easily you can use a JSON validator like jsonlint.

Error: Missing recipient

This error occurs if the message cannot be delivered to the Add-on. Potential causes may be:

  • the provided Add-on ID is incorrect (i.e. does not match the real Add-on ID)
  • the Add-on is not listening for messages (i.e. does not support messages)
  • the Add-on is disabled or not installed