# Message passing between content/background scripts in WebExtension API

**URL:** <https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691>\
**Category:** Development\
**Created:** [August 30, 2015, 4:08pm UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691 "2015-08-30T16:08:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![audiodude](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/audiodude/32/31029_2.png) [@audiodude](https://discourse.mozilla.org/u/audiodude)\
**Post date:** [August 30, 2015, 4:08pm UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691/1 "2015-08-30T16:08:29Z")

</div>

The [wiki page](https://wiki.mozilla.org/WebExtensions) for WebExtension says, under “extension” that:

> extension:  
> We support only getBackgroundPage and getURL

Does that mean that chrome.extension.sendMessage is not supported? How do we do message passing between content and background scripts?

Thanks!

---

<div class="post-metadata">

**Author:** ![arenlor](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/arenlor/32/21018_2.png) [@arenlor](https://discourse.mozilla.org/u/arenlor)\
**Post date:** [August 30, 2015, 5:15pm UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691/2 "2015-08-30T17:15:23Z")

</div>

I’d suggest reading that more carefully. It’s still experimental and still in development. See about extending the APIs here too: [https://developer.mozilla.org/en-US/Add-ons/WebExtensions](https://developer.mozilla.org/en-US/Add-ons/WebExtensions)

---

<div class="post-metadata">

**Author:** ![audiodude](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/audiodude/32/31029_2.png) [@audiodude](https://discourse.mozilla.org/u/audiodude)\
**Post date:** [August 30, 2015, 6:54pm UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691/3 "2015-08-30T18:54:00Z")

</div>

Thanks for the link to additional info. I’ve read the list a few more times, and it seems that at the top of the list it says:

> The following APIs are fully or partially supported.

But then, since under ‘extension’ it says that “only” getBackgrondPage and getUrl are supported, I would assume it means that chrome.extension.sendMesssage is not supported. Is this just a glitch in the documentation? The developer.mozilla page you linked to seems to indicate that message passing is indeed a primary way extensions will work.

Is it just not implemented yet?

---

<div class="post-metadata">

**Author:** ![arenlor](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/arenlor/32/21018_2.png) [@arenlor](https://discourse.mozilla.org/u/arenlor)\
**Post date:** [August 31, 2015, 1:55am UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691/4 "2015-08-31T01:55:37Z")

</div>

It appears it’s just not implemented yet. I’d hit them up on the uservoice link at the dev page about it though.

---

<div class="post-metadata">

**Author:** ![audiodude](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/audiodude/32/31029_2.png) [@audiodude](https://discourse.mozilla.org/u/audiodude)\
**Post date:** [August 31, 2015, 2:46am UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691/5 "2015-08-31T02:46:49Z")

</div>

Yes, that’s the impression that I got as well. Can you point me more specifically in the direction of the uservoice forum? I don’t see a link.

---

<div class="post-metadata">

**Author:** ![arenlor](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/arenlor/32/21018_2.png) [@arenlor](https://discourse.mozilla.org/u/arenlor)\
**Post date:** [August 31, 2015, 3:02am UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691/6 "2015-08-31T03:02:19Z")

</div>

[https://webextensions.uservoice.com/forums/315663-webextension-api-ideas](https://webextensions.uservoice.com/forums/315663-webextension-api-ideas)

---

<div class="post-metadata">

**Author:** ![audiodude](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/audiodude/32/31029_2.png) [@audiodude](https://discourse.mozilla.org/u/audiodude)\
**Post date:** [August 31, 2015, 3:13am UTC](https://discourse.mozilla.org/t/message-passing-between-content-background-scripts-in-webextension-api/3691/7 "2015-08-31T03:13:18Z")

</div>

Thanks so much for all your help!
