问题是,在运行此扩展程序时,我会在尝试发出通知时收到SecurityError DOM 18
。
这就是我的清单文件的样子:
{
"name": "No",
"manifest_version": 2,
"version": "1",
"content_scripts": [
{
"js": ["js.js"]
}
],
"permissions": [
"notifications", "tabs"
],
"web_accessible_resources": [
"48.png"
]
}
这是通知:
var notification = webkitNotifications.createNotification(
'/favicon.ico',
'Item added to cart!', // notification title
'Item ............ has been successfully added to the cart.' // notification body text
);