solid-devtools
solid-devtools copied to clipboard
Abstract extension messaging
The messaegs sent between the adapter and the extension have to cross this road: adapter -> content -> background -> devtools (and back, maybe)
- In most cases the content and background scripts are just passing messages through without doing anything more. This is an opportunity to abstract this messaging system to avoid wiring every message individually. (Something in shape of webext-bridge)
// send message from adapter to devtools directly
sendMessage("MessageName", payload, "devtools")
- Sharing state could use the same API as solid signals, just synced between the extension and the adapter.
const [state, setState] = createBridgeSignal("NameOfTheSignal", initialValue)