1

I have exactly the same problem as in the Why is chrome.browserAction.onClicked undefined? but I have only background script and yet I receive the same error:

Manifest

{
    "background": {
        "scripts": ["background.js"],
        "persistent": false
    },
     "permissions": [
        "https://*/*",
        "http://*/*",
        "tabs"
    ]
}

background.js

chrome.browserAction.onClicked.addListener( function(tab) {
    console.log(tab);
});

Error

Uncaught TypeError: Cannot read property 'onClicked' of undefined

mike35x95x1
  • 163
  • 1
  • 8

0 Answers0