Create confirmation as CS after clicking on context menu
I created a context menu that save an image after clicking on the menu item. I would like to create a nice confirmation as CS.
What would be the best way to send a message from the BGSW to CS?
Here the code I have in BGSW in
background/index.ts
:
And just to confirm, I would like a message to send some data from the context menu listener to CS as well as a message so I can open the confirmation modal.
Should I use Porta for that? And how to send data from my contextMenu listener to CS?1 Reply
can try
window.postMessage()
at BG and receive it with window.addEventListener("message", (event) => {})