mdn / mdn/webextensions-examples

[MV3 userScripts API] Is Firefox MV3 intentionally not supporting `browser.runtime.onMessage`? Why?

Open
#612 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4.5k
Forks
2.6k
Avg merge
15h 27m
Merged PRs (30d)
3

Description

(Sorry I am not sure where should I post this question.)

Is Firefox MV3 intentionally not supporting browser.runtime.onMessage in MV3 userScripts API? Why?

For Chrome, it supports both sending (browser.runtime.sendMessage) and receiving (browser.runtime.onMessage).

Why Firefox MV3 only supports sending (browser.runtime.sendMessage).

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/userScripts#messaging

I am referring this particular usage in MV3 userScripts API, to receive the background message in MV3 userScripts.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/sendMessage

There is no clear description in MDN docs for my question. I don't understand why MV3 userScripts API can send but not receive.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked MDN userScripts messaging documentation and the tabs/sendMessage reference, then compare the stated Firefox MV3 behavior with Chrome's behavior. Done means the documentation clearly states whether browser.runtime.onMessage is supported for MV3 userScripts and explains the reason or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.