Javascript Chrome富通知未显示
好的,在我的Chrome扩展的清单中,我已经允许了通知,现在我正在使用webkitNotifications,虽然我说富通知,并且更喜欢它们,所以我开始研究如何编写它们,比如需要哪些参数,所以我在控制台中进行了测试,但它没有出现Javascript Chrome富通知未显示,javascript,google-chrome,google-chrome-extension,Javascript,Google Chrome,Google Chrome Extension,好的,在我的Chrome扩展的清单中,我已经允许了通知,现在我正在使用webkitNotifications,虽然我说富通知,并且更喜欢它们,所以我开始研究如何编写它们,比如需要哪些参数,所以我在控制台中进行了测试,但它没有出现 chrome.notifications.create('report',{ type:'basic', title:'hello world', message:'Dance with me please', expandedMessage:'Hell
chrome.notifications.create('report',{
type:'basic',
title:'hello world',
message:'Dance with me please',
expandedMessage:'Hello thanks for using our app',
priority:1,
buttons:[{title:'Follow URL'},{title:'Remind me Later'}],
isClickable:true
},function(){});
但是我不确定这是否是我所需要的全部,因为
webkitNotifications
需要一个show()
函数来实际显示它。有什么想法吗?创建
方法需要iconUrl
chrome.notifications.create('report',{
type:'basic',
title:'hello world',
iconUrl: 'yourIconUrl',
message:'Dance with me please',
expandedMessage:'Hello thanks for using our app',
priority:1,
buttons:[{title:'Follow URL'},{title:'Remind me Later'}],
isClickable:true
},function(){});