OLD | NEW |
(Empty) | |
| 1 <h1>externally_connectable</h1> |
| 2 |
| 3 <p> |
| 4 The <code>externally_connectable</code> manifest property declares which extensi
ons, apps, and web pages can connect to your extension via <a href="../runtime.h
tml#method-connect">runtime.connect</a> and <a href="../runtime.html#method-send
Message">runtime.sendMessage</a>. |
| 5 </p> |
| 6 |
| 7 <p> |
| 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>. |
| 9 </p> |
| 10 |
| 11 <h2 id="manifest">Sample manifest.json</h2> |
| 12 <pre> |
| 13 { |
| 14 "name": "My externally connectable {{platform}}", |
| 15 "externally_connectable": { |
| 16 // Extension and app IDs: |
| 17 "ids": [ |
| 18 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", |
| 19 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", |
| 20 ... |
| 21 ], |
| 22 // Alternatively, for all extensions and apps: |
| 23 "ids": ["*"], |
| 24 // Match patterns for <em>web pages</em>, not content scripts: |
| 25 "matches": [ |
| 26 "https://*.google.com", |
| 27 "*://*.chromium.org", |
| 28 ... |
| 29 ] |
| 30 }, |
| 31 ... |
| 32 } |
| 33 </pre> |
| 34 |
| 35 <h2 id="reference">Reference</h2> |
| 36 <p class="api_reference"> |
| 37 {{+partials.type @:apis.manifestTypes.byName.ExternallyConnectable}} |
| 38 </p> |
OLD | NEW |