Skip to content

Fix Background File Scaffold

Pre-release
Pre-release
Compare
Choose a tag to compare
@adambullmer adambullmer released this 21 Nov 08:57
· 46 commits to master since this release
e87f322

Fixes a minor bug in a scaffolded background.js file, where the incorrect message listener would be used in the event the user scaffolded the app with both the background and popup options selected.

This only fixes new scaffolds, for existing projects who are trying to continue to use the default background script listener, just change the first line of your src/background.js to this:

browser.runtime.onMessage.addListener(function (request, sender, sendResponse) {