Closed
Bug 1373621
Opened 7 years ago
Closed 7 years ago
Keep Sidebar content in sync while having two Firefox windows open
Categories
(WebExtensions :: Frontend, enhancement)
WebExtensions
Frontend
Tracking
(Not tracked)
VERIFIED
INVALID
People
(Reporter: rhubscher, Unassigned)
Details
Using the new web-extension sidebar API, I found out that two sidebars can be open at the same time. I am looking for a way each time I edit a sidebar to trigger an event to all opened sidebars in other windows to tell them to refresh their content. I tried to send and event to the background script and ask it to send an event back to the web-extension but it didn't work (each sidebar might have its own background script). Right now I am polling for changes in storage.local every few seconds but it gets in the way of the UX and some strange behavior occurs. Any idea?
Comment 1•7 years ago
|
||
runtime.sendMessage and runtime.onMessage should do this for you. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/sendMessage For asking questions, you can find forums, irc channels, etc. in the community support links (bottom of left menu): https://developer.mozilla.org/en-US/Add-ons/WebExtensions
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•7 years ago
|
||
It works thanks. I was missing the extensionID probably.
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•