如何创建通知chrome扩展?

Moh*_*awa 2 mysql notifications google-chrome google-chrome-extension

我想创建一个谷歌Chrome扩展,在添加mysql数据库中的新记录时通知用户!有人可以帮助我吗?谢谢.

crz*_*777 9

请参阅此页面.

使用chrome.notifications API使用模板创建丰富的通知,并向系统托盘中的用户显示这些通知.

http://developer.chrome.com/extensions/notifications.html

chrome.notifications.create(
    'name-for-notification',{   
    type: 'basic', 
    iconUrl: 'image.jpeg', 
    title: "This is a notification", 
    message: "hello there!" 
    },

function() {} 

);
Run Code Online (Sandbox Code Playgroud)

您可以像这样创建通知.