The externally_connectable manifest property declares which extensions, apps, and web pages can connect to your {{platform}} via runtime.connect and runtime.sendMessage.
For a tutorial on message passing see cross-extension and app messaging and sending messages from web pages.
If externally_connectable is not declared in your {{platform}}'s manifest, all extensions and apps can connect, but no webpages can connect. As a consequence, when updating your manifest to use externally_connectable, if "ids": ["*"] is not specified then other extensions and apps will lose the ability to connect to your {{platform}}. This may be an unintended consequence, so keep it in mind.
{
"name": "My externally connectable {{platform}}",
"externally_connectable": {
// Extension and app IDs. If this field is not specified, no extensions or
// apps can connect.
"ids": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
...
// Alternatively, to match all extensions and apps, specify only "*".
"*"
],
// Match patterns for web pages. Does not affect content scripts. If this
// field is not specified, no webpages can connect.
"matches": [
"https://*.google.com",
"*://*.chromium.org",
...
]
},
...
}
{{+partials.type @:apis.manifestTypes.byName.ExternallyConnectable}}