No output to service worker console with chrome extension

Viewed 16

enter image description here

I'm trying to build an extension to monitor the xhr portion of the devtools network tab. I decided to start as simple as possible with the background script below. I'm seeing no errors on loading the extension, but don't see any output in the console.

enter image description here

manifest.json:

{
"manifest_version": 3,
"version": "1.0",
"name": "Hello World!",
"description": "Learning how to make a chrome extension!",
"icons": {
    "16": "images/puppy16.png",
    "48": "images/puppy48.png",
    "128": "images/puppy128.png"
},
"action": {
    "default_icon": "images/puppy.png",
    "default_popup": "popup.html"
},
"background": {
    "service_worker": "background.js"
},
"host_permissions": [
    "https://cnn.com/*"
],
"permissions": [
    "webRequest"
]
}

In my background.js:

(function () {

    chrome.webRequest.onCompleted.addListener(
        function (details) {
            console.log('HELLO THERE!!!!', details);
        },
        { urls: ["<all_urls>"] }
    );

}());

What am I doing wrong?

0 Answers
Related