diff options
Diffstat (limited to 'src/background/index.js')
| -rw-r--r-- | src/background/index.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/background/index.js b/src/background/index.js new file mode 100644 index 0000000..9c97c9d --- /dev/null +++ b/src/background/index.js @@ -0,0 +1,19 @@ +/** + * Background entry point (Firefox MV3 event page, ES module). + * + * All event listeners are registered synchronously at the top level so the + * event page can be woken by any of them (MDN: background scripts). + */ + +import { registerRuntimeMessageHandler, handleConnection } from './message-router.js'; +import { loadSettings, watchSettings } from './settings-service.js'; + +// One-shot messages from popup / options. +registerRuntimeMessageHandler(); + +// Streaming connections from the content script. +browser.runtime.onConnect.addListener(handleConnection); + +// Keep the validated settings cache in sync and load initial settings. +watchSettings(); +void loadSettings();
\ No newline at end of file |
