HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mozilla
webextension-polyfill
JavaScript2017–2025
mozilla / webextension-polyfill · Archived

webextension-polyfill

A lightweight polyfill library for Promise-based WebExtension APIs in Chrome

18Distinct people
22Mentions
0Explicit recommenders
3.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A lightweight polyfill library for Promise-based WebExtension APIs in Chrome

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 10:02:05 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year22 dated mentions

Observed mentions: 2017-08-01 19:24:06 UTC to 2025-06-22 14:02:41 UTC.

012342017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC413
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC303
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC404
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202

What Hacker News says

3 sources
The only really difference sometimes is in the manifest. If you target the webextension api and use the Mozilla poly fill library, your code base does not need to be duplicated at all. It adds the benefit of being able to use all API calls in a promise based manner instead of needing to use callbacks. Edit: To give it a bit more context (although you can find that in other comments I left under this post). The polyfill library itself: https://github.com/mozilla/webextension-polyfill Which if included allows you to swap out `chrome` callback based calls for promise based `browser` calls. So instead of using `chrome.extension.api.call(() => { // callback})` you do something like `await browser.extension.api.call()` with the same results working in both browsers. Then the only thing where you still need some separation is for the manifest a
Read the rest
s some keys are Firefox specific and vice versa. An example you can find here: https://github.com/toolbox-team/reddit-moderator-toolbox Where all code lives in one directory and there is just two manifest files, one for chrome and firefox: https://github.com/toolbox-team/reddit-moderator-toolbox/tre... Building is nothing more than rollup packaging the code and grabbing the right manifest to put in the build directory for each browser: https://github.com/toolbox-team/reddit-moderator-toolbox/blo...
In Plasmo – A framework for building modern Chrome extensions
> The docs supplied by Google are quite good! They are okayish in my book. Personally, I prefer using the MDN docs [0][1] for web extensions as I am using mozilla's polyfill library [2] anyway. These contain more practical examples and less abstract descriptions at times, including a very thorough getting started guide [3] going over everything including various concepts. The point remains the same though, the basics aren't all that difficult and while Plasmo does seem to make some aspects easier it also seems like overkill in other areas in regard to abstraction. [0] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web... [1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web... [2] https://github.com/mozilla/webextension-polyfill [3] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
In Plasmo – A framework for building modern Chrome extensions
Technically correct, but it is a bit more complex. The original web extension API is based on the chrome extension API. So most (there are some annoying exceptions at times) of the chrome extension API calls also work with very little adjustment on firefox. It becomes even easier when you use mozilla's polyfill library https://github.com/mozilla/webextension-polyfill Then you can just target the promise based webextension syntax and as long as you still stick to the calls also available in chrome your extension works with very little effort in both browsers. Safari is a different story which basically amounts to Apple being Apple and sort of supporting webextensions but in such a roundabout way that it is barely worth it for the majority of extension devs.
In Button Stealer

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.