externally_connectable

Type Object
Mandatory No
Manifest version 2 or higher
Example
json
"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 runtime.connect() and 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

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
externally_connectable
Chrome – Full support
Chrome 67 (Release date: 2018-05-29)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1319168
Opera – Full support
Opera 54 (Release date: 2018-06-28)
footnote Full support
Safari – Partial support
Safari 15.4 (Release date: 2022-03-14)
footnote Partial support
footnote Only supports the matches property.
footnote See bug 269299
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – Partial support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Partial support
footnote Only supports the matches property.
footnote See bug 269299

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
See implementation notes.