79076335

Date: 2024-10-10 22:41:41
Score: 1
Natty:
Report link

You're getting a CROS error because you're calling the request from the content script. If you execute the request from the service worker page or from the iframe, then CORS error will not occur. Accordingly, in order to create communication between the content script and the service worket page, you need to use chrome.runtime.sendMessage

Here is an article on this topic: https://developer.chrome.com/docs/extensions/reference/api/runtime?hl=ru#method-sendMessage

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Андрій Панчій