铬webkitNotification未找到:API失踪 [英] Chrome webkitNotification not found : api missing

查看:363
本文介绍了铬webkitNotification未找到:API失踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发使用AngularJS一个警报通知扩展。它从一个REST API警报和显示noification(webkitNotifications)。
这是我的笔记本电脑都很好(我在那里开发),但是当我过筛到我的桌面进行测试地狱爆发。
我现在得到的错误:

I am developing a alert notification extension using AngularJS. It fetches alerts from a REST api and shows noification (webkitNotifications). It was all good on my laptop (where I was developing) but hell broke when I sifted to my desktop for testing. I now get error :

ReferenceError: webkitNotifications is not defined
at chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/background.js:156:5
at chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:72:169
at E (chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:100:258)
at E (chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:100:258)
at E (chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:100:258)
at chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:102:5
at h.$eval (chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:112:179)
at h.$digest (chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:109:268)
at h.$apply (chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:113:7)
at g (chrome-extension://dncdcpdlbnnhncggaenbpknljjbmdlpo/js/angular.min.js:72:337) angular.min.js:92

笔记本:v34.0.1847.116米

Laptop : v34.0.1847.116 m

桌面:v35.0.1916.69公测-M

Desktop : v35.0.1916.69 beta-m

推荐答案

最老的通知API已经去preciated而现在,它的建议使用丰富的通知。执行是pretty容易,你不应该有任何问题了。

The old notification API has been depreciated and now, it's suggested to use Rich Notifications. The implementation is pretty easy and you shouldn't have any problems with it.

下面是链接到的文档:

Here is the link to the documentation: go!

您应该知道的Linux版本的,这里盛产的通知仅在开发频道可供选择。在稳定的版本,旧版本的API仍然是可以访问,并可能导致一些问题,当你扩展将在不同的系统中使用。

You should be aware of Linux version, where rich notifications are available only in dev channel. In stable version, old API is still accessible and may cause several problems when your extension will be used across different systems.

这篇关于铬webkitNotification未找到:API失踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆