Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

TODO: Deprecate in favor of webextension-polyfill #21

Closed
Gudahtt opened this issue Nov 16, 2020 · 5 comments · Fixed by MetaMask/metamask-extension#13960
Closed

TODO: Deprecate in favor of webextension-polyfill #21

Gudahtt opened this issue Nov 16, 2020 · 5 comments · Fixed by MetaMask/metamask-extension#13960
Assignees

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Nov 16, 2020

The webextension-polyfill project has similar goals to this project, and offers a nicer API. We should consider deprecating this project in favor of webextension-polyfill.

I'm not entirely sure the goals of the two projects are the same though, as they explicitly don't want to support non-standard features. If that's something we want, then maybe it's still worth maintaining this project.


Edit by @rekmarks: We are going to do this.

@rekmarks
Copy link
Member

Here are the APIs detected by this package: https://github.com/MetaMask/extensionizer/blob/master/extension-instance.js#L1-L23
This is the list of Mozilla WebExtensions APIs: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API

As we can see, this package only detects a subset of all web extension APIs. We detect one Chrome-specific API, namely chrome.contextMenus, but do not appear to use it anywhere.

In the readme of this package, we also find the following line:

For the full list of supported methods, refer to the MDN API documentation.

Given all of the above, I don't think the intention of this package is to support non-standard features, and I think we can safely deprecate it in favor of webextension-polyfill. Perhaps @kumavis and @danfinlay have more context.

@danfinlay
Copy link
Contributor

I don't think we've ever relied on any non-standard interfaces. It might be nice to use some at some point, though. I could imagine shipping some enhancements to browsers that support the context menu API. As long as there is a way for us to detect that later, it's not a big deal, it still seems better to me to use a commonly relied on module rather than continue supporting some thing that mostly only we rely on.

@rekmarks rekmarks removed the question label Nov 23, 2020
@rekmarks rekmarks changed the title Consider deprecating in favor of webextension-polyfill TODO: Deprecate in favor of webextension-polyfill Nov 23, 2020
@adonesky1 adonesky1 self-assigned this Mar 14, 2022
@adonesky1
Copy link

Possibly implementing this as part of MV3 work

@adonesky1
Copy link

@kumavis or @rekmarks would either of you be available to help me POC this. I'm having trouble getting this package to play nice with our build system.

@adonesky1
Copy link

Actually disregard my previous comment. I think I've got it figured!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants