How to sendToBackground from main world

i've try all of messaging method but background still not receive anything
6 Replies
Saqlain
Saqlain8mo ago
Were you able to get it working?
SEMESTER 5 MENIT TIDUR
yeah
Saqlain
Saqlain8mo ago
For me i am sending msg from main world using sendToBackgroundViaRelay, then i receive that message in content script which is not in main world, then i use sendToBackground which sends that message to background service from content script. When my middle content script receives the response i use window.postMessage which sends the response to main world, so basically i have to use a content script in middle as a relayer of messages, to and from main and bg Are you using something similar or have you found a way to directly communicate between main world and bgsw?
SEMESTER 5 MENIT TIDUR
mine using similar method using sendToBackgroundViaRelay from main world and use relayMessage on content to send it to bgsw
Saqlain
Saqlain8mo ago
Ok, thanks for confirming 👍
SEMESTER 5 MENIT TIDUR
👍🏻

Did you find this page helpful?