仅适用于扩展的Chrome丰富通知? [英] Chrome Rich Notifications for Extensions Only?

查看:78
本文介绍了仅适用于扩展的Chrome丰富通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我希望通过使用Chrome的Rich Notifications来增强的页面。然而,我读过的网页似乎暗示此API仅适用于Chrome扩展程序。是这样吗?我很想利用API,但我不想花时间将我的Web应用程序转换为Chrome扩展,除非绝对必要。

I have a page that I would like to enhance by using Chrome's Rich Notifications. The pages I've read however, seem to imply that this API is only available to Chrome extensions. Is this the case? I would love to take advantage of the API, but I don't want to invest the time in converting my web application into a Chrome extension unless absolutely necessary.

谢谢!

推荐答案

您的web应用程序没有写入扩展名或将您的webapp转换为完整(打包)的Chrome应用程序,则无法访问 chrome.notifications

I does seem that without writing an extension for your webapp, or converting your webapp into a full (packaged) Chrome App, you cannot get access to chrome.notifications.

我试着用<$ c $制作托管应用 c>清单中的通知权限,但只允许访问HTML5 通知而不询问用户。

I've tried to make a Hosted App with "notifications" permission in the manifest, but that only grants access to HTML5 Notification without asking the user. Same goes for background pages.

你最好的办法是做一个简约的扩展,你的页面可以与进行通信。发布后,您可以使用内联安装向您的用户发布扩展。

Your best bet is to make a minimalistic extension that your page can communicate with. Once that is published, you can advertise the extension to your users with Inline Install.

这篇关于仅适用于扩展的Chrome丰富通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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