Hacker GitHub

← All repos

mozilla/webextension-polyfill

View on GitHub ↗ ★ 3,067 JavaScript archived

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

22 mentions on Hacker News by 18 people: 1 story, 21 comments · first 2017-08-01 · latest 2025-06-22

Mentions per year 22 mentions · busiest year 2020 (4)
20082026
  1. Not yet! there are ways to do it with https://github.com/mozilla/webextension-polyfill but i want to focus on one thing at a time for now! BTW firefox was my main driver before starting develop for the web, then i realized it has a 5%…
  2. …on Firefox [1] [2] but I fixed that _easily_ by getting the crx file, unpacking it, then adding the https://github.com/mozilla/webextension-polyfill to the extension to make it cross-browser. It's easy enough to make an extension work on…
  3. …(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…
  4. …[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...
  5. …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…
    comment by creesch · 2024-07-23 · in Button Stealer
  6. …this extension to Firefox should be relatively straightforward using the webextension polyfill: https://github.com/mozilla/webextension-polyfill
    comment by dedoussis · 2023-12-20 · in Show HN: Chrome Reaper
  7. Indeed I have issue here. Firefox maintain a library for unified extension API https://github.com/mozilla/webextension-polyfill Their type definition for HAR request isn't exported https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mas…
  8. …cool, bundle it with webextension-polyfill [0] and you can release it as a decent NPM package. [0] https://github.com/mozilla/webextension-polyfill
  9. …be imperfect, and edge cases are abundant. [1]: https://www.w3.org/community/webextensions/ [2]: https://github.com/mozilla/webextension-polyfill
  10. …It does get a bit trickier if you also want to incorporate TypeScript [1] or React however. [0] https://github.com/mozilla/webextension-polyfill [1] https://github.com/Lusito/webextension-polyfill-ts
  11. …of something like DefinePlugin[1] for webpack to include/exclude code based on build target. [0] https://github.com/mozilla/webextension-polyfill/ [1] https://github.com/webpack/docs/wiki/list-of-plugins#definep...
  12. …APIs to be promise based (and provides a nice helpful library for Chrome/Edge/Safari support: https://github.com/mozilla/webextension-polyfill ) which... doesn't work on their platform. Doubly ironic, since the result is that most FF…
  13. Yes: https://github.com/mozilla/webextension-polyfill
    comment by Vinnl · 2021-05-28 · in Manifest v3 Update
  14. …So you have to port your Chrome extension to use 'browser' and use the following polyfill: https://github.com/mozilla/webextension-polyfill Here's some incompatibilities between Chrome and Firefox to consider:…
  15. For more information and tools, see https://youtu.be/6jgBM8twUIQ https://github.com/mozilla/webextension-polyfill
  16. …to bring the browser namespace into chrome if you want to use promises over function callbacks. https://github.com/mozilla/webextension-polyfill
  17. …more work than I expected to be honest. I wish I had started originally using Mozilla's polyfill: https://github.com/mozilla/webextension-polyfill
  18. ▲ 1
    Ask HN: What do you use to facilitate creating browser extensions?
    story by proszkinasenne2 · 2020-02-10 · 0 comments
  19. …= self.browser; } else { self.browser = self.chrome; } Instead of using a polyfill like that one https://github.com/mozilla/webextension-polyfill ?
    comment by proszkinasenne2 · 2019-06-17 · in uBlock Origin 1.20
  20. …Chrome but it was missing some important apis last I checked (sessions and optional permissions). https://github.com/mozilla/webextension-polyfill
  21. …to use the browser.* APIs on both Chrome and Firefox using Mozilla's web extensions polyfill. https://github.com/mozilla/webextension-polyfill The biggest challenge for me was addressing browser incompatibilities and Firefox bugs. This is…
    comment by eejdoowad · 2017-08-07 · in Porting a Chrome Extension to Firefox
  22. …mozilla devs that port the browser namespace and promise based api calls over to chrome if needed. https://github.com/mozilla/webextension-polyfill
    comment by weaksauce · 2017-08-01 · in Browser Extensions Standard