alphagov / govuk-browser-extension

Chrome and Firefox extension for developers working on GOV.UK.
22 stars 5 forks source link

Simplify message passing between popup and background script #58

Closed suzannehamilton closed 7 years ago

suzannehamilton commented 7 years ago

Call background script which stores A/B test settings from the popup script directly, rather than sending and listening for events. Events are only necessary when communicating between content and background scripts.

This is in preparation for storing environment-specific A/B test settings: using function calls rather than chrome.runtime.onMessage will make this easier to unit test, as well as being conceptually simpler.

https://trello.com/c/jra1OClm/320-make-it-easy-to-test-experiments-in-non-prod-environments