Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for browser.* APIs #276

Open
devkabiir opened this issue Jul 22, 2018 · 0 comments
Open

Support for browser.* APIs #276

devkabiir opened this issue Jul 22, 2018 · 0 comments

Comments

@devkabiir
Copy link

devkabiir commented Jul 22, 2018

Hi there!,
Would it be possible to create webextensions using this lib?

The chrome.* and browser.* APIs are the same(at least that's what I think) and there are polyfills available in JS echo-system to create cross-browser webextensions.

After looking through the source I found that in lib/src/common.dart

final JsObject chrome = context['chrome'];

I don't know a whole lot about extension development and dart in general, still learning.
But my understanding is this that if chrome is assigned to context['chrome'] ?? context['browser'] then extensions should also work in firefox.

For instance in MDN docs for browser.tabs.getCurrent in acknowledgements section it is said that
browser.tabs is based on chrome.tabs API. So the above change should allow all the chrome.* based APIs in firefox to work when using this lib.

I don't know if this is even in the scope of this lib, looking for some guidance on how to develop cross-browser extensions.

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

No branches or pull requests

1 participant