lingua-libre / SignIt

🌻 Lingua Libre SignIt web-browser extension translates selected word in French Sign Language via an elegant pop up so you learn sign language while reading online.
https://addons.mozilla.org/en-US/firefox/addon/lingua-libre-signit/
MIT License
15 stars 15 forks source link

Review webextension-polyfill usages #70

Open hugolpz opened 5 months ago

hugolpz commented 5 months ago

As I dived back into the code and its maintenance I'm remembering of :

We have it installed in the packgage.json, but I think it is not properly imported accorss the web-extension.

Ways to load polyfill

See Basic Setup

Resources

kabir-afk commented 5 months ago

Well I can't seem to remember where I read it but as far as I remember...it was something about callbacks and promises with relation to previous manifest version (MV2). In MV2 chrome used callbacks while other browsers supported promises...but now that promise support is added , I said that the we no longer have to use webExtension polyfill API. But upon understanding more of the extension and reading more docs , I realized that we do need polyfills for cross browser compatibility.

As far as the issue is concerned then in the PR#63 I commnetd out the polyfill library inside my popup.js , so that might be the reason why it isn't imported properly.

kabir-afk commented 5 months ago

Can I mention one other thing ? When uncommenting the polyfill library inside popup.js , it throws error background page is missing or something like that. And this was also the reason I kept it commented out.