Reputation: 1304
I'm building a Chrome extension that features Desktop Notifications. The following is the code I use:
var notification = webkitNotifications.createNotification(
'48.png',
'Hello!',
'Lorem ipsum...'
);
48.png is in the extension folder AND in the array of web_accessible_resources in the manifest.json
. But the icon does not show up.
Can you help me? I'm using the latest Chrome version (Apple version, 22.0.1229.94).
Upvotes: 2
Views: 2977
Reputation:
The images in desktop notifications don't work in OS X. Windows and ChromeOS only.
Upvotes: 1
Reputation: 261
Could the problem be web accessability-issues?
Try to whitelist your image in web accessible resources in your manifest-file. Rob W has provided a more thorough answer here:
Insert an image in chrome extension
Upvotes: 1
Reputation:
Perhaps you should try this:
var notification = webkitNotifications.createNotification(
chrome.extension.getURL('48.png'),
'Hello!',
'Lorem ipsum...'
);
use chrome.extension.getURL to get the extension path to your resources
Upvotes: 1