I plan to switch my addon to WebExtensions but I have an issue with context menu: I can’t change the context menu real-time. The way I try to do it is:
I listen to the right click event and send a message with chrome.runtime.sendMessage which triggers context menu update. Everything is async so this update happens a bit after the context menu is opened so, to see it updated, I need to close the context menu and open it again.
The same thing happens in chrome and opera, of course. Can someone tell me how to make it work properly?