Struggling with Plasmo Messaging API: Sending Message from CSUI to BGSW Issue
Hey guys, I've tried so far to understand how Plasmo Messaging API works (from CSUI to BGSW) and although I read through the whole Doc again and again I still miss some key understanding.
Long story short, I try to send to the background a message 'clipboards' via a from :
The structure of my background folder is the following:
`
is left empty.
The code of is the following:
`
Your help would be highly appreciated!
13 Replies
Hi @Alix, Did you figure out how that works? I'm stuck at the same stage.
Hey @abhi , the best alternative I have found was not to inject the content script in the Main world.
I have not explicitly stated to inject into the main world, so I think it is not in the main world, but I am still not able to get a message. I have almost the same structure as you.
If you don't mind can you look at below code and let me know If I am doing somthing wrong.
content script
capture.ts
Oh therefore you should remove « extensionId: « … » »
I was doing that, but it is still not working. I thought maybe it could work, so I tried it, but still no luck.
How is structured your background folder?
Hmm that sucks
I’ll take a closer look at my code see if there’s anything else
But genuinely I remember having struggled for days and it miraculously worked at some point
I am trying different solutions from the internet this morning. Thank you for your help. Let me know if you get anything.
Gave +1 Rep to @Alix (current:
#27
- 1
)Hey It worked after I manually reloaded the extension. Thank you for your help. 🥳
Gave +1 Rep to @Alix (current:
#17
- 2
)Nice 👍🏻