Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/mozilla/add-ons/webextensions/manifest.json/externally_connectable/index.md
6581 views
---
title: externally_connectable slug: Mozilla/Add-ons/WebExtensions/manifest.json/externally_connectable page-type: webextension-manifest-key tags: - Add-ons - WebExtensions - manifest.json browser-compat: webextensions.manifest.externally_connectable
---

{{AddonSidebar}}

Type Object
Mandatory No
Manifest version 2 or higher
Example

"externally_connectable": {
  "ids": [
    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "cccccccccccccccccccccccccccccccc"
  ],
  "matches": [
    "https://example1.com/*",
    "*://*.example2.com/*"
  ]
}

Externally connectable controls which other extensions and web pages can communicate with an extension using {{WebExtAPIRef("runtime.connect","runtime.connect()")}} and {{WebExtAPIRef("runtime.sendMessage", "runtime.sendMessage()")}} message passing. If externally_connectable is not specified, all extensions can communicate with each other but not with web pages.

Note: For communication with web pages:

"ids" attribute

ids enables communication between this extension and other installed extensions specified by extension identifiers. Use the pattern "*" to communicate with all extensions.

"matches" attribute

matches is a list of regular expressions that enables communication between an extension and the web pages that match the expression.

Note: If externally_connectable is not specified, communication among extensions is allowed as if externally_connectable specified {"ids": ["*"] }. Therefore, if you specify externally_connectable.matches, don't forget to add ids if you want to communicate with other extensions.

Browser compatibility

{{Compat}}