1 <h1>externally_connectable</h1>
4 The <code>externally_connectable</code> manifest property declares which extensions, apps, and web pages can connect to your {{platform}} via <a href="../runtime.html#method-connect">runtime.connect</a> and <a href="../runtime.html#method-sendMessage">runtime.sendMessage</a>.
8 For a tutorial on message passing see <a href="../messaging.html#external">cross-extension and app messaging</a> and <a href="../messaging.html#external-webpage">sending messages from web pages</a>.
11 <h2 id="without-externally-connectable">Connecting without externally_connectable</h2>
14 If <code>externally_connectable</code> 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 <code>externally_connectable</code>, if <code>"ids": ["*"]</code> 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.
17 <h2 id="manifest">Sample manifest.json</h2>
18 <pre data-filename="manifest.json">
20 "name": "My externally connectable {{platform}}",
21 "externally_connectable": {
22 // Extension and app IDs. If this field is not specified, no extensions or
25 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
26 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
28 // Alternatively, to match all extensions and apps, specify only "*".
31 // Match patterns for web pages. Does not affect content scripts. If this
32 // field is not specified, no webpages can connect.
34 "https://*.google.com",
38 // Indicates that the extension would like to make use of the TLS channel
39 // ID of the web page connecting to it. The web page must also opt to send
40 // the TLS channel ID to the extension via setting
41 // <code>includeTlsChannelId</code> to <code>true</code> in
42 // $ref:runtime.connect's connectInfo or $ref:runtime.sendMessage's options.
43 "accepts_tls_channel_id": false
49 <h2 id="reference">Reference</h2>
50 <p class="api_reference">
51 {{+partials.type @:apis.manifestTypes.byName.ExternallyConnectable}}