How can background.js send an XHR to a server in the context of a Chrome extension?
I want to build an extension that requires sending a message to a node.js server and receiving a response. It should do this automatically, which is why I can’t implement this in popup.js. This is my extension-side code that sends a message to the server: