Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

How to access the background page from the browserAction popup #13

Open
dandv opened this issue Aug 20, 2015 · 2 comments
Open

How to access the background page from the browserAction popup #13

dandv opened this issue Aug 20, 2015 · 2 comments

Comments

@dandv
Copy link
Contributor

dandv commented Aug 20, 2015

Re. https://github.com/foobarbecue/gottafixit/blob/master/chromeext/src/background.js#L2 - would this pattern help? We use it in a Chrome extension:

let MyApp = chrome.extension.getBackgroundPage().MyApp;
MyApp.asteroid.loginWithPassword(form.elements.email.value, form.elements.password.value).then(function (userId) {
  MyApp.userId = userId;
...
}
@wiber
Copy link

wiber commented Jan 10, 2016

don't you need message passing for that? https://developer.chrome.com/extensions/messaging

@foobarbecue
Copy link
Owner

Sorry for the long delay in replying to both of your comments. Either solution would probably work. Haven't had time to work on this project but if you submit a PR I'll pop it in!

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

No branches or pull requests

3 participants