0

I'm writing an extension for Chrome. This extension has a service worker (f.k.a. background script) that makes a network request to a third-party service. However, I'd like to see what happens when this network request fails. How can I block network requests from my service worker to a particular domain or URL?

I know how to do so for content scripts or for ordinary in-page JavaScript; I'm asking specifically about service workers.

JesseTG
  • 2,025
  • 1
  • 24
  • 48
  • 1
    Open [devtools for background.js](/a/10258029) and switch it offline in the network panel. – wOxxOm Apr 20 '23 at 18:37

0 Answers0