extcharge

Guide

Port a Chrome extension to Firefox and Edge

1 December 2026

Microsoft Edge runs Chrome extensions with minimal changes: you check the APIs, remove update_url, replace "Chrome" in the name, and submit the same ZIP through Microsoft Partner Center. Firefox needs a few real changes: an add-on ID in browser_specific_settings.gecko, a background.scripts entry because Firefox does not run extension service workers, and code that copes with host permissions the user can revoke.

This guide covers both browsers for a Manifest V3 extension and ends with a build step that writes one manifest per browser from a single source.

What do I change for Microsoft Edge?

Microsoft states that the extension APIs and manifest keys Chrome supports are code-compatible with Edge. The port is a short list:

  1. Compare the APIs you use with Edge's supported API list. An unsupported API means the extension may not port directly.
  2. Remove update_url from the manifest.
  3. If "Chrome" appears in the name or description, rebrand it to "Microsoft Edge". Certification requires this.
  4. Sideload the extension in Edge and test it.
  5. If you use native messaging, set allowed_origins in the host manifest to your Edge extension ID.

You publish through Partner Center. Registration has no fee. Individual accounts verify faster than company accounts, which can take days to weeks. The Privacy page asks the same five things as the Chrome Web Store: single purpose, permission justifications, remote code, data usage and a privacy policy URL. Certification can take up to seven business days.

Some listing assets differ from Chrome's:

What does Firefox need in the manifest?

A Manifest V3 extension must declare its own ID to be signed, whether you list it on addons.mozilla.org (AMO) or distribute it yourself. AMO does not assign one. Use an email-like string, which Mozilla recommends, or a GUID. Since November 3, 2025, new AMO submissions must also declare data_collection_permissions.

"browser_specific_settings": {
  "gecko": {
    "id": "@reading-list.example",
    "data_collection_permissions": { "required": ["none"] }
  }
}

If you send data, replace "none" with the matching categories, such as websiteContent or financialAndPaymentInfo. Two more rules catch Chrome manifests: the version must be one to four dot-separated numbers without letters or leading zeros, and Firefox does not support use_dynamic_url in web_accessible_resources.

Does Firefox support background service workers?

No. Firefox does not support background.service_worker. It runs a non-persistent event page from background.scripts instead. You can declare both in one manifest:

"background": {
  "scripts": ["background.js"],
  "service_worker": "background.js"
}

Chrome 121 and later ignore scripts and start the service worker. Firefox 121 and later start the event page and ignore service_worker. Older Chrome refuses to load the manifest, which is one more reason to generate it per browser.

Watch for worker-only code. importScripts() exists only in workers, so it fails in a Firefox event page. List the files in load order in background.scripts, or guard the call:

// background.js
// Firefox: "scripts": ["lib.js", "background.js"]
// Chrome:  "service_worker": "background.js"
if (typeof importScripts === "function") importScripts("lib.js");

Should I use chrome.* or browser.*?

Firefox offers the browser.* namespace with promises. In Manifest V3, Firefox also returns promises from the chrome.* namespace. Chrome added promises in Manifest V3, and according to MDN it exposes browser.* from Chrome 148.

How do host permissions differ in Firefox?

In Firefox, users can grant or revoke any host permission at any time. From Firefox 127, hosts in host_permissions and content_scripts are shown in the install prompt and granted on install. Firefox 126 and earlier did not grant them on install. Hosts added in an update are not shown to the user. So ask from a click before you rely on a host:

const origins = ["https://api.example.com/*"];

function ensureHostAccess() {
  // No await before request(): Firefox drops the user action after one.
  // request() resolves true without a prompt if access is already granted.
  return chrome.permissions.request({ origins });
}

document.querySelector("#enable").addEventListener("click", ensureHostAccess);

permissions.request() works only inside a user action handler, such as a click in the popup or options page. In Firefox, awaiting any promise before the call ends the user action, so call it first.

Other Firefox MV3 differences to check: the content security policy allows only 'self' and 'wasm-unsafe-eval' in script-src, and content scripts can no longer make cross-origin requests. Send those through the background script.

What does AMO review need for bundled or minified code?

If a minifier, bundler such as webpack, template engine or any other build tool produced files in your package, you must upload the source code with the submission. Reviewers rebuild the extension, and the output must match your package exactly. Include:

Build tools must be open source and run locally, not on the web. Mozilla also notes that minifying rarely protects your code. Shipping unminified files avoids the source upload altogether.

How do I build one manifest per browser?

Keep one base manifest and a small override per browser. A build script merges them and copies the source into one folder per browser:

// build.mjs: node build.mjs
import { readFileSync, writeFileSync, cpSync, rmSync } from "node:fs";

const read = (f) => JSON.parse(readFileSync(f, "utf8"));
const base = read("manifest.base.json");

for (const target of ["chrome", "firefox"]) {
  const out = `dist/${target}`;
  rmSync(out, { recursive: true, force: true });
  cpSync("src", out, { recursive: true });
  const manifest = { ...base, ...read(`manifest.${target}.json`) };
  writeFileSync(`${out}/manifest.json`, JSON.stringify(manifest, null, 2));
}
// manifest.chrome.json
{ "background": { "service_worker": "background.js" } }

// manifest.firefox.json
{
  "background": { "scripts": ["lib.js", "background.js"] },
  "browser_specific_settings": {
    "gecko": {
      "id": "@reading-list.example",
      "data_collection_permissions": { "required": ["none"] }
    }
  }
}

Zip dist/chrome for both the Chrome Web Store and Edge, and dist/firefox for AMO. Because this script only copies files, AMO needs no source upload. If you add a bundler, include this script in the source upload.

The checklist

Do it with your AI assistant

Paste this into Claude Code, Cursor or Copilot in your extension's repository:

Read https://extcharge.com/guides/port-chrome-extension-firefox-edge.html and apply it to this extension.

Adding payments

If the extension has paid features, you want one payment setup for every store, not one per browser. The ExtCharge client targets Chrome Manifest V3 and also runs in Firefox and Edge; it uses webextension-polyfill. In the Firefox build, list ExtCharge.js before background.js in background.scripts instead of calling importScripts. You connect your own Stripe account once, and the same plans and paid check serve all three builds.

The AI setup prompt adds it for you and works on Manifest V3 extensions only. For anything else, follow the integration guide.

Try ExtCharge on your extension

Connect your Stripe account, register your extension and add a plan. The dashboard walks you through it.