Я работаю в расширении Chrome и хочу использовать API уведомлений для оповещения, когда происходит событие, но когда я пишу в код уведомления, возникает исключение DOM.
var description="10 minustes are last for your "+nextItem.noteDesc+" event";
alert(description);
if ( window.webkitNotifications) {
console.log("Notifications are supported!");
webkitNotifications.createNotification(
'http://aux3.iconpedia.net/uploads/634295872704029736.png',
'Alert!', description);
}
else {
console.log("Notifications are not supported for this Browser/OS version yet.");
}
Я делаю запросдля разрешения уведомления в файле mainfest.json
{
"name": "Alert extention",
"version": "1.0",
"description": "Personal alert.",
"browser_action": {
"default_icon": "img/clock.png",
"popup": "Alert.html"
},
"permissions": [
"notifications"
]
}
это предложение "Уведомления поддерживаются!"выводится на консоль, затем возникает ошибка
Uncaught Error: SECURITY_ERR: DOM Exception 18
Как я могу решить эту проблему?
Редактировать Примечание. Используемый мной браузер - Google Chrome.