Hi all,
I just posted a messaging library for Chrome and Firefox, MV2 and MV3 extensions:
It has a bunch of useful features, mainly:
- cross-process messaging
- named buses to easily target individual processes
- named and nested handlers to support more complex use cases
- transparent handling of sync and async calls
- transparent handling of process and runtime errors
- a consistent interface for processes and tabs
Effectively, you set up endpoints for each process, and every other bus can call and target those endpoints via path.
I've been running a version of it for the last few years, but have recently rewritten it and decided to open source it. I've included in both the code and the docs my accumulated knowledge on all things messaging, so feel free to use, comment or critique.
Best wishes,
Dave