plasmo icon indicating copy to clipboard operation
plasmo copied to clipboard

[BUG] sendToBackground is not allowed in MAIN world content script

Open karthest opened this issue 5 months ago • 3 comments

What happened?

As sendToBackground notes: image 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: image

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.

karthest avatar Sep 05 '24 09:09 karthest