Blog / Build with AI /
Firefox and Edge versions of your Chrome extension
You built a Chrome extension. It works. Then someone asks, “Is there a Firefox version?” or a client on Edge says it won’t install.
Good news: Chrome, Edge and Firefox all use the same family of extension technology, called WebExtensions. Most of your code can travel. The work is in the differences, and an AI assistant is useful for exactly that kind of careful, repetitive comparison.
The finished thing: one codebase that builds an extension for Chrome, one for Edge and one for Firefox, each submitted to its own store.
Step 0: know the lay of the land
| Browser | Based on | Effort to port | Store |
|---|---|---|---|
| Edge | Chromium (same as Chrome) | Very low, often no code changes | Microsoft Edge Add-ons |
| Firefox | Gecko | Moderate, a few manifest and API differences | Firefox Add-ons (AMO) |
| Safari | WebKit | Higher, needs Xcode | Not covered here |
Edge accepts Chrome extensions almost as they are, because the browsers share an engine. Firefox is where the real differences live.
Step 1: do the Edge version first
It’s the easy win. Take your Chrome extension package and:
- Create a developer account in the Microsoft Edge Add-ons programme (Partner Center). Read the current terms and fees on their page.
- Test the extension by loading it unpacked in Edge: go to the extensions page, switch on developer mode and choose “Load unpacked”.
- Fix anything that depends on Chrome-only services, such as links to the Chrome Web Store in your settings page or text that says “Chrome”.
- Prepare Edge-friendly listing text, screenshots and a privacy statement.
- Submit.
Most extensions need no code change at all. Review times vary, so don’t plan a launch date to the hour.
Step 2: Firefox, where the differences live
Firefox supports Manifest V3, which Chrome now requires. But it doesn’t implement it identically. The differences that trip people up:
1. Background scripts. Chrome MV3 runs your background code as a service worker. Firefox uses event pages or background scripts, declared in the manifest with "background": { "scripts": ["background.js"] }. If you give Firefox only a service_worker entry, it may not load it. A manifest can list both keys so each browser uses what it understands, though you should test that in the versions you target.
2. The browser namespace. Firefox’s API lives at browser.* and returns promises. Chrome uses chrome.*. Chrome now also supports promises for most calls, and Firefox accepts chrome.* for compatibility, but behaviour can differ. A small compatibility layer, such as Mozilla’s webextension-polyfill, smooths this over.
3. An extension ID. Firefox wants one in the manifest:
"browser_specific_settings": {
"gecko": {
"id": "your-extension@example.com"
}
}
4. Permissions and some APIs. Not every Chrome API exists in Firefox. Features like chrome.sidePanel or offscreen are Chrome-specific, and Firefox has other ways (for example a sidebar action). Anything you use that’s unusual needs a check.
5. Review process. Firefox reviews submissions and may ask for readable source code if you use a bundler or minifier. Keep your build reproducible and write short build instructions.
Step 3: use AI for the boring comparison
This is where an assistant earns its keep. Give it your manifest and the list of APIs your code calls, and ask it to find the gaps.
Here is my Chrome Manifest V3
manifest.jsonand the list ofchrome.*APIs my extension uses. I want a Firefox build. List every manifest key or API that Firefox doesn’t support or handles differently, say what to change, and give me the edited manifest. Don’t change anything that already works in both.
Then:
Here is
background.js, written for a Chrome service worker. Rewrite it so it works as a Firefox event page too, using thewebextension-polyfill. Keep the logic identical and show a diff.
Two warnings. First, models sometimes describe browser features from older versions or invent API names, so verify against the official MDN and browser documentation for anything you rely on. Second, always test; don’t assume.
Step 4: one codebase, two manifests
Rather than maintain forks, keep a shared src folder and generate two manifests at build time. A tiny Node script can do it:
// build.js: write a manifest per browser
const fs = require('fs');
const base = JSON.parse(fs.readFileSync('manifest.base.json'));
const chrome = { ...base, background: { service_worker: 'background.js' } };
const firefox = {
...base,
background: { scripts: ['background.js'] },
browser_specific_settings: { gecko: { id: 'your-extension@example.com' } }
};
fs.mkdirSync('dist/chrome', { recursive: true });
fs.mkdirSync('dist/firefox', { recursive: true });
fs.writeFileSync('dist/chrome/manifest.json', JSON.stringify(chrome, null, 2));
fs.writeFileSync('dist/firefox/manifest.json', JSON.stringify(firefox, null, 2));
Copy the rest of src into each folder, zip them, and you have two packages. Edge uses the Chrome one.
Step 5: test in Firefox
- Open
about:debugging, choose “This Firefox” and “Load Temporary Add-on”, and select themanifest.json. - Click through every feature, including settings and any storage.
- Watch the console for errors.
- Try it in a fresh profile, so you aren’t testing on your own saved data.
For a tool that’s useful to people running sites, such as a tab organiser or an SEO checker, Firefox users are a smaller but loyal crowd and often leave thoughtful feedback.
What goes wrong most often
- A
service_workerkey that Firefox ignores or rejects. - Missing extension ID.
- Using Chrome-only APIs without a fallback.
- Store listing text that says “Chrome” on the other stores.
- Assuming
asyncbehaviour is identical. - Forgetting a privacy policy link where the store needs one.
A pre-submission checklist
Next step
Related reading
- Building a page notes extension with AI
- Extension ideas for online shoppers
- Building a reading mode extension with AI
Do Edge this week, since it’s nearly free. Then try the Firefox build with the manifest script above. Which of your extension’s features do you expect to break first?