Search code examples
jsongoogle-chromegoogle-chrome-extensionmanifesthtml5-notifications

Chrome Extension not detecting notification permission


I'm using the Chrome Extension Example Tutorial to build a simple extension to display a HTML5 desktop notification.

The trouble I seem to be having is that although I have changed the manifest file to request notification permission (See Below) but when I check permission none have been requested.

{
  "manifest_version": 2,

  "name": "Desktop notification",
  "description": "Show a desktop notification",
  "version": "1.0",

  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  },

  "permissions": [
    "notifications"
  ]
}

If I change the permissions back to the original permission it works fine.


Solution

  • The notifications permission is not considered "special" enough to be listed in the requested permissions of the extension. Not being listed there does not mean it not "granted" to the extension.