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 customized browser api to avoid conflict with global variable #260

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arthur791004
Copy link

Goal

As a extension development, if we need to use webext-redux on certain website which has already define a global variables named browser, it would make it not work because the getBrowserAPI function looks for a global browser api.

Therefore, add option named browserAPI for development to give the target browserAPI and avoid to looks for a global browser api

Changes

  • Add option named browserAPI and default is null which fallback to getBrowserAPI function
  • Update comment of options

@arthur791004 arthur791004 changed the title Support customize browser api Support customized browser api to avoid conflict with global variable Oct 7, 2020
Copy link
Owner

@tshaddix tshaddix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply here. This makes sense to me! Thank you for the PR.

Can you also add the new param to the TS file?

https://github.com/tshaddix/webext-redux/blob/master/index.d.ts

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

Successfully merging this pull request may close these issues.

None yet

2 participants