erizoy
erizoy

Reputation: 129

Desktop notification from background script

I'm beginner in chrome extensions development. I'm trying to show desktop notifications when my background script finishes some of its methods but i don't know how i can request permissions for this. Is there any way to accomplish this task?

It can be done using content script, but I want to show notifications by background script, without background page.

Upvotes: 4

Views: 1355

Answers (1)

Andrew Hall
Andrew Hall

Reputation: 3073

You need to add notifications to your manifest.json file:

"permissions": ["tabs", "notifications","management"]

You can then call

webkitNotifications.createNotification('images/message48.png', title, message);

Upvotes: 3

Related Questions