plasmo
plasmo copied to clipboard
[BUG] sendToBackground is not allowed in MAIN world content script
What happened?
As sendToBackground notes:
It seems like sending message from MAIN world content script to background is allowed by adding extensionId. But actually it can not because chrome.runtime is undefined in main world. And you will get this error if you follow the api's notes:
Version
Latest
What OS are you seeing the problem on?
Linux
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
(OPTIONAL) Contribution
- [ ] I would like to fix this BUG via a PR
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate problems.