問題は、この拡張機能を実行する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
);