mdn / mdn/webextensions-examples

devtools-panels example broken with manifest v3

Open
#562 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What information was incorrect, unhelpful, or incomplete?

The README says:

Inject content script: this sends a message to the extension's background script, asking it to inject a given content script in the active page.

The background script uses browser.tabs.executeScript to do this, but executeScript is undefined with manifest v3.

Flipping the manifest version back to 2 makes it work, but I don't think new extensions that use manifest v2 are accepted any more.

What did you expect to see?

The example should work.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

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

Start with the devtools-panels example's README and its background script, focusing on the browser.tabs.executeScript call described in the issue. Check the manifest version and the relevant WebExtensions API entry point, then verify that the example works without reverting to manifest v2.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.