How to sendToBackground from main world

i've try all of messaging method but background still not receive anything
6 Replies
Saqlain
Saqlainβ€’7mo ago
Were you able to get it working?
SEMESTER 5 MENIT TIDUR
SEMESTER 5 MENIT TIDUROPβ€’7mo ago
yeah
Saqlain
Saqlainβ€’7mo 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
SEMESTER 5 MENIT TIDUROPβ€’7mo ago
mine using similar method using sendToBackgroundViaRelay from main world and use relayMessage on content to send it to bgsw
Saqlain
Saqlainβ€’7mo ago
Ok, thanks for confirming πŸ‘
SEMESTER 5 MENIT TIDUR
SEMESTER 5 MENIT TIDUROPβ€’7mo ago
πŸ‘πŸ»
Want results from more Discord servers?
Add your server