Add background message reception
Closed this issue · 0 comments
bgins commented
Summary
Problem
The current implementation of the browser extension only receives messages from Webnative when a developer has the Webnative devtools panel open.
Impact
Developers will miss messages if they navigate to another panel in the devtools interface.
Solution
Move message reception to the devtools page.
Detail
The devtools page is kept alive while the developer has the devtools open. Handling messages here will let developers navigate around the devtools interface freely.
This change will require an update to when we connect and disconnect from Webnative. We have a couple of options:
- Connect when the devtools are opened, and disconnect when they are closed (see: https://developer.chrome.com/docs/extensions/mv3/devtools/#detecting-open-close)
- Add record and stop buttons to the panel interface where the developer can control the connection