Chrome桌面通知示例[关闭]伽罗理查德 · 03月30日 如何使用Chrome桌面通知?我想在我自己的代码中使用它。 更新:这是一篇博客文章,其中举例说明了Webkit通知。359赞KoaJSJavaScript
Notify.js是新Webkit通知的包装。效果很好。
http://alxgbsn.co.uk/2013/02/20/notify-js-a-handy-wrapper-for-the-web-notifications-api/
这是有关API的不错的文档,
https://developer.chrome.com/apps/notifications
而且,由Google提供的官方视频解释,
https://developers.google.com/live/shows/83992232-1001
我喜欢:http : //www.html5rocks.com/zh-CN/tutorials/notifications/quick/#toc-examples,但是它使用了旧变量,因此该演示不再起作用。
webkitNotifications
现在Notification
。查看设计和API规范(仍是草稿),或查看(不再提供页面的来源)中的简单示例:主要是对的调用
window.webkitNotifications.createNotification
。如果您想要一个更强大的示例(您正在尝试创建自己的Google Chrome浏览器扩展程序,并且想知道如何处理权限,本地存储等),请查看Gmail通知程序扩展程序:下载crx文件而不是安装并将其解压缩并阅读其源代码。
你的回答