Note that the documentation lists iconUrl
as a required option for opt
in chrome.notifications.create
.
So suppose you add a picture icon.png
to the root of your extension. Then your code can be modified like that:
var opt = {
type: "basic",
title: "Deploy",
message: "It worked!",
iconUrl: "icon.png"
};
chrome.notifications.create("", opt, function(id) {
if(chrome.runtime.lastError) {
console.error(chrome.runtime.lastError.message);
}
});
This should work, and in case there is any problem with the notification you'll get informed in the console.